🗊Презентация Conditional statements. Java Core

Нажмите для полного просмотра!
Conditional statements. Java Core, слайд №1Conditional statements. Java Core, слайд №2Conditional statements. Java Core, слайд №3Conditional statements. Java Core, слайд №4Conditional statements. Java Core, слайд №5Conditional statements. Java Core, слайд №6Conditional statements. Java Core, слайд №7Conditional statements. Java Core, слайд №8Conditional statements. Java Core, слайд №9Conditional statements. Java Core, слайд №10Conditional statements. Java Core, слайд №11Conditional statements. Java Core, слайд №12Conditional statements. Java Core, слайд №13Conditional statements. Java Core, слайд №14Conditional statements. Java Core, слайд №15Conditional statements. Java Core, слайд №16Conditional statements. Java Core, слайд №17Conditional statements. Java Core, слайд №18Conditional statements. Java Core, слайд №19Conditional statements. Java Core, слайд №20Conditional statements. Java Core, слайд №21Conditional statements. Java Core, слайд №22Conditional statements. Java Core, слайд №23Conditional statements. Java Core, слайд №24Conditional statements. Java Core, слайд №25Conditional statements. Java Core, слайд №26Conditional statements. Java Core, слайд №27Conditional statements. Java Core, слайд №28

Вы можете ознакомиться и скачать презентацию на тему Conditional statements. Java Core. Доклад-сообщение содержит 28 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1





Conditional statements 
Java Core
Описание слайда:
Conditional statements Java Core

Слайд 2





Agenda
Operators
Conditional statements
Enum
Comparing objects
JUnit
Practical tasks
Описание слайда:
Agenda Operators Conditional statements Enum Comparing objects JUnit Practical tasks

Слайд 3





Arithmetic operators
Simple Assignment Operator
=   Simple assignment operator
Описание слайда:
Arithmetic operators Simple Assignment Operator = Simple assignment operator

Слайд 4





Unary Operators
Описание слайда:
Unary Operators

Слайд 5





Equality and Relational Operators
Equality and Relational Operators
==	Equal to
!=	Not equal to
>	Greater than
>=	Greater than or equal to
<	Less than
<=	Less than or equal to
Описание слайда:
Equality and Relational Operators Equality and Relational Operators == Equal to != Not equal to > Greater than >= Greater than or equal to < Less than <= Less than or equal to

Слайд 6





Conditional Operators
The && and || operators perform Conditional-AND and Conditional-OR operations on two boolean expressions. 
&& 	Conditional-AND 
|| 	Conditional-OR
Описание слайда:
Conditional Operators The && and || operators perform Conditional-AND and Conditional-OR operations on two boolean expressions. && Conditional-AND || Conditional-OR

Слайд 7





Ternary Operator ? :
Описание слайда:
Ternary Operator ? :

Слайд 8





Statement if
Описание слайда:
Statement if

Слайд 9





switch
  switch (expression) 
  { 
       case const-expr1 : 
		statement(s); 
		break; 
       case const-expr1 : 
		statement(s); 
		break; 
       default : 
		statement(s); 
		break;
  }
Описание слайда:
switch switch (expression) { case const-expr1 : statement(s); break; case const-expr1 : statement(s); break; default : statement(s); break; }

Слайд 10





Example
Описание слайда:
Example

Слайд 11





Enum
Описание слайда:
Enum

Слайд 12





Example
Season season;
...
switch (month) {
case "Desember": case "January": case "February":
	season = Season.WINTER; break;
case "Marth": case "April": case "May":
	season = Season.SPRING; break;
case "June": case "Jule": case "August":
	season = Season.SUMMER; break;
case "September": case "October": case "November":
	season = Season.AUTUMN; break;
default:
	System.out.println("No this month");
	System.exit(0);
}
Описание слайда:
Example Season season; ... switch (month) { case "Desember": case "January": case "February": season = Season.WINTER; break; case "Marth": case "April": case "May": season = Season.SPRING; break; case "June": case "Jule": case "August": season = Season.SUMMER; break; case "September": case "October": case "November": season = Season.AUTUMN; break; default: System.out.println("No this month"); System.exit(0); }

Слайд 13





Comparing objects 
public class Student {
	private String name;
	private int age;
	public Student(String name, int age) {
		this.name = name;
		this.age = age;
	}
	getters, setters ...
}
Описание слайда:
Comparing objects public class Student { private String name; private int age; public Student(String name, int age) { this.name = name; this.age = age; } getters, setters ... }

Слайд 14





hashCode
Описание слайда:
hashCode

Слайд 15





equals
Описание слайда:
equals

Слайд 16





JUnit Framework
JUnit is a unit testing framework for the Java programming language. 
JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with SUnit.
Описание слайда:
JUnit Framework JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with SUnit.

Слайд 17





Testing Problems
Programmers should write tests
As you probably know programmers always busy, and they have no time to write tests
They need some tool that can help them
Main requirements for this tool:
A few lines of code then test should run
To write test that won’t run, then write the code that will make run
Описание слайда:
Testing Problems Programmers should write tests As you probably know programmers always busy, and they have no time to write tests They need some tool that can help them Main requirements for this tool: A few lines of code then test should run To write test that won’t run, then write the code that will make run

Слайд 18





JUnit plugin for Eclipse IDE
Mr. Erich Gamma who is a one of developers of JUnit framework also known as a Eclipse IDE developer
JUnit well integrated into Eclipse IDE
Описание слайда:
JUnit plugin for Eclipse IDE Mr. Erich Gamma who is a one of developers of JUnit framework also known as a Eclipse IDE developer JUnit well integrated into Eclipse IDE

Слайд 19





JUnit assertion methods
Описание слайда:
JUnit assertion methods

Слайд 20


Conditional statements. Java Core, слайд №20
Описание слайда:

Слайд 21


Conditional statements. Java Core, слайд №21
Описание слайда:

Слайд 22





Class Calc
public class Calc {
    
    public int add(int a, int b) {
        return a + b;
    }
    
    public int div(int a, int b){
        return a / b;
    }
}
Описание слайда:
Class Calc public class Calc { public int add(int a, int b) { return a + b; } public int div(int a, int b){ return a / b; } }

Слайд 23





Class CalcTest
import static org.junit.Assert.*;
import org.junit.Test;
public class CalcTest {
    Calc calc = new Calc();
    @Test
    public void testAdd() { assertTrue(calc.add(1, 5) == 6);}
    @Test
    public void testDivPositive() {
        int actual = 4;
        int expected = calc.div(9, 2);
        assertEquals(actual, expected);
    }
    
    @Test(expected = Exception.class)
    public void testDivZero() {
        int actual = calc.div(23, 0);
    } 
}
Описание слайда:
Class CalcTest import static org.junit.Assert.*; import org.junit.Test; public class CalcTest { Calc calc = new Calc(); @Test public void testAdd() { assertTrue(calc.add(1, 5) == 6);} @Test public void testDivPositive() { int actual = 4; int expected = calc.div(9, 2); assertEquals(actual, expected); } @Test(expected = Exception.class) public void testDivZero() { int actual = calc.div(23, 0); } }

Слайд 24





Practical tasks
Enter three numbers. Find out how many of them are odd.
Enter the number of the day of the week. Display the name in three languages.
Enter the name of the country. Print the name of the continent. (Declare enum with names of continents)
Create class Product with fields name, price and quantity.
Create four instances of type Product. 
Display the name and quantity of the most expensive item.
Display the name of the items, which has the biggest quantity.
Описание слайда:
Practical tasks Enter three numbers. Find out how many of them are odd. Enter the number of the day of the week. Display the name in three languages. Enter the name of the country. Print the name of the continent. (Declare enum with names of continents) Create class Product with fields name, price and quantity. Create four instances of type Product. Display the name and quantity of the most expensive item. Display the name of the items, which has the biggest quantity.

Слайд 25





HomeWork (online course)
UDEMY course "Java Tutorial for Complete Beginners": https://www.udemy.com/java-tutorial/
Complete lessons 10, 11, 13:
Описание слайда:
HomeWork (online course) UDEMY course "Java Tutorial for Complete Beginners": https://www.udemy.com/java-tutorial/ Complete lessons 10, 11, 13:

Слайд 26





Unit Testing with JUnit
Short step-by-step online course: 
https://www.udemy.com/junit-tutorial-for-beginners-with-java-examples/learn/v4/overview
Описание слайда:
Unit Testing with JUnit Short step-by-step online course: https://www.udemy.com/junit-tutorial-for-beginners-with-java-examples/learn/v4/overview

Слайд 27





Homework
Solve the next tasks:
read 3 float numbers and check: are they all belong to the range [-5,5];
read 3 integer numbers and write max and min of them;
read number of HTTP Error (400, 401,402, ...) and write the name of this error (Declare enum HTTPError)
Сreate class Dog with fields name, breed, age. 
Declare enum for field breed. 
Create 3 instances of type Dog. 
Check if there is no two dogs with the same name. 
Display the name and the kind of the oldest dog. 
*Add Unit Tests to each task, publish code on GitHub
Описание слайда:
Homework Solve the next tasks: read 3 float numbers and check: are they all belong to the range [-5,5]; read 3 integer numbers and write max and min of them; read number of HTTP Error (400, 401,402, ...) and write the name of this error (Declare enum HTTPError) Сreate class Dog with fields name, breed, age. Declare enum for field breed. Create 3 instances of type Dog. Check if there is no two dogs with the same name. Display the name and the kind of the oldest dog. *Add Unit Tests to each task, publish code on GitHub

Слайд 28





The end
Описание слайда:
The end



Похожие презентации
Mypresentation.ru
Загрузить презентацию