This exercise focuses on mastering control structures in Java, including if-else, switch, while, and for loops. The tasks include:
Calculate income tax based on a progressive tax system using nested if-else statements.
- Program:
TaxCalculator.java
Analyze and interpret egg marking codes from Javaland using switch statements.
- Program:
EggMarking.java
Compute the sum of digits for a sequence of integers using a while loop. The program outputs the digit sum for each number and the total sum of all digit sums.
- Program:
DigitSum.java
Draw a triangle of a given number of rows using nested for loops.
- Program:
PaintTriangle.java
src/
In.javaHelper class for inputOut.javaHelper class for outputTaxCalculator.javaTax calculation taskEggMarking.javaEgg marking taskDigitSum.java Digitsum taskPaintTriangle.javaTriangle drawing task
tests/
Testprotokolle.txtTest cases and results for all tasks
- Programming Language: Java
- Editor: Visual Studio Code with JavaWiz extension
This project is licensed under the MIT License.