#5 Java Conditional Statements - MIDTERM
#5 Java Conditional Statements - MIDTERM
1
Lesson Topics
Click to edit Master title style
1. Conditional Statements
2. Relational Operators
3. If Statements
4. If – Else Statements
5. If – Else If – Else Statements
6. Nested Conditional Statements
7. Equals Function
8. Logical Operators
9. Lesson Activity 2 2
CONDITIONAL STATEMENTS
Click to edit Master title style
3 3
CONDITIONAL STATEMENTS
Click to edit Master title style
4 4
RELATIONAL OPERATORS
Click to edit Master title style
5 5
IF STATEMENT
Click to edit Master title style
6 6
IF STATEMENT
Click to edit Master title style
If (condition){
// Do something here
}
7 7
IF STATEMENT
Click to edit Master title style
8 8
Click to edit Master title style
9 9
Click to edit Master title style
10 10
RELATIONAL OPERATORS
Click to edit Master title style
11 11
Click to edit Master title style
12 12
IF ELSE STATEMENT
Click to edit Master title style
13 13
IF ELSE STATEMENT
Click to edit Master title style
If (condition){
// Do something here
}
else{
// Do something here
}
14 14
IF ELSE STATEMENT
Click to edit Master title style
16 16
Click to edit Master title style
17 17
IF, ELSE IF, ELSE STATEMENT
Click to edit Master title style
18 18
IF, ELSE IF, ELSE STATEMENT
Click to edit Master title style
If (condition){
// Do something here
}
else if(condition){
// Do something here
}
else{
// Do something here
}
19 19
IF ELSE STATEMENT
Click to edit Master title style
BMI Categories:
< 18 Underweight
< 24 Normal weight
< 30 Overweight
> 30 Obesity
21 21
Click to edit Master title style
22 22
Click to edit Master title style
23 23
NESTED CONDITIONAL STATEMENT
Click to edit Master title style
24 24
NESTED CONDITIONAL STATEMENT
Click to edit Master title style
If (condition){
If (condition){
//Do something here
}
25 25
NESTED CONDITIONAL STATEMENT
Click to edit Master title style
If (age>=18){
If (isVerified){
System.out.println(Qualified);
}
26 26
Click to edit Master title style
27 27
Click to edit Master title style
28 28
EQUALS FUNCTION
Click to edit Master title style
29 29
EQUALS FUNCTION
Click to edit Master title style
String x = “Hello”;
if(x.equals(“Hello”)){
System.out.println(“Hi there!”);
}
3030
Click to edit Master title style
31 31
Click to edit Master title style
32 32
Click to edit Master title style
33 33
Click to edit Master title style
34 34
LOGICAL OPERATORS
Click to edit Master title style
35 35
Click to edit Master title style
36 36
Click to edit Master title style
37 37
Click to edit Master title style
3838
Click to edit Master title style
39 39
Click to edit Master title style
LESSON
ACTIVITY
40
GRADE AVERAGE PROGRAM
Click to edit Master title style
Average : 96
With High Honors
43 43
Click to edit Master title style
44 44
Click to edit Master title style
Conditional
Statements
45
Click to edit Master title style
Thank You. ❤
46
Sir Mark Leslie D. Melendez