Похожие презентации:
Java. Lecture 4. Control flow_Conditionals
1. Programming languages 1. java. Fall semester 2025-2026 Lecture 4. Conditionals
PROGRAMMINGLANGUAGES 1.
JAVA.
FALL SEMESTER
2025-2026
LECTURE 4.
CONDITIONALS
2.
23.
34.
45.
56.
67.
78.
89.
910.
1011.
1112.
1213.
1314.
1415.
1516.
1617.
1718.
1819.
1920.
2021.
2122.
2223.
2324.
2425.
2526.
2627.
2728.
2829.
2930.
3031.
3132.
3233.
3334.
3435.
3536.
3637.
3738.
3839.
3940.
4041.
4142.
4243.
4344.
4445.
4546. DEMO
- Calculator- If ; blocks;
46
47.
4748.
4849. Practice session
PRACTICESESSION
Write a calculator that
- supports 4 operations: addition,
subtraction, division, multiplication
- prints the name of the operation
and the result
- checks division by zero and prints
warning message
- checks non-existent operation
name and prints a warning
message
49
50. HW
1. Rewrite your calculator project using switch-case2. Build a simple grading system application:
- it evaluates 3 numbers: attendance points (maximum 10),
homework points (maximum 70), exam points (maximum 30)
- Print the total points and evaluate if the student has “passed”
or failed”
- “Passed” conditions: more than 65 points in total, at least 6
pints for attendance, at least 17 points for the exam
50