Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
28 слайдов
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
0.97 MB
Просмотров:
65
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд![Conditional statements Java](/documents_6/a822b87b36d679d7702ca75b86237647/img0.jpg)
Содержание слайда: Conditional statements
Java Core
№2 слайд![Agenda Operators Conditional](/documents_6/a822b87b36d679d7702ca75b86237647/img1.jpg)
Содержание слайда: Agenda
Operators
Conditional statements
Enum
Comparing objects
JUnit
Practical tasks
№3 слайд![Arithmetic operators Simple](/documents_6/a822b87b36d679d7702ca75b86237647/img2.jpg)
Содержание слайда: Arithmetic operators
Simple Assignment Operator
= Simple assignment operator
№4 слайд![Unary Operators](/documents_6/a822b87b36d679d7702ca75b86237647/img3.jpg)
Содержание слайда: Unary Operators
№5 слайд![Equality and Relational](/documents_6/a822b87b36d679d7702ca75b86237647/img4.jpg)
Содержание слайда: 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 amp](/documents_6/a822b87b36d679d7702ca75b86237647/img5.jpg)
Содержание слайда: Conditional Operators
The && and || operators perform Conditional-AND and Conditional-OR operations on two boolean expressions.
&& Conditional-AND
|| Conditional-OR
№7 слайд![Ternary Operator ?](/documents_6/a822b87b36d679d7702ca75b86237647/img6.jpg)
Содержание слайда: Ternary Operator ? :
№8 слайд![Statement if](/documents_6/a822b87b36d679d7702ca75b86237647/img7.jpg)
Содержание слайда: Statement if
№9 слайд![switch switch expression case](/documents_6/a822b87b36d679d7702ca75b86237647/img8.jpg)
Содержание слайда: switch
switch (expression)
{
case const-expr1 :
statement(s);
break;
case const-expr1 :
statement(s);
break;
default :
statement(s);
break;
}
№10 слайд![Example](/documents_6/a822b87b36d679d7702ca75b86237647/img9.jpg)
Содержание слайда: Example
№11 слайд![Enum](/documents_6/a822b87b36d679d7702ca75b86237647/img10.jpg)
№12 слайд![Example Season season ...](/documents_6/a822b87b36d679d7702ca75b86237647/img11.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img12.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img13.jpg)
Содержание слайда: hashCode
№15 слайд![equals](/documents_6/a822b87b36d679d7702ca75b86237647/img14.jpg)
Содержание слайда: equals
№16 слайд![JUnit Framework JUnit is a](/documents_6/a822b87b36d679d7702ca75b86237647/img15.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img16.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img17.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img18.jpg)
Содержание слайда: JUnit assertion methods
№20 слайд![](/documents_6/a822b87b36d679d7702ca75b86237647/img19.jpg)
№21 слайд![](/documents_6/a822b87b36d679d7702ca75b86237647/img20.jpg)
№22 слайд![Class Calc public class Calc](/documents_6/a822b87b36d679d7702ca75b86237647/img21.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img22.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img23.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img24.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img25.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img26.jpg)
Содержание слайда: 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](/documents_6/a822b87b36d679d7702ca75b86237647/img27.jpg)
Содержание слайда: The end