Task 1: Interpret the structure of a simple Java program with output:
class MyJava {
}
public static void main (String [] args) {
System.out.println ("Welcome to our Java Class!");
}
Standard edition:
System.out.println ("text to be output"); System.out.println (1 + 2 + 3 + 4 + 5
+ "Numbers and Text" + 6 + 7 + 8 + 9 + 0);
Use the self-explanatory code snippets to understand the syntax and meaning of
program branches (if) and loops (while, do while, for) clear.
branch
if (value> max) {
max = value;
}
else if (value <min) {
min = value;
}
else {
System.out.println ("The value is in the interval [" + min + "," + max + "].");
}
grind
// Head controlled endless loop
while (true) {
System.out.println ("Echo");
}
// foot-controlled loop do {
System.out.println ("I am unique."); } while (0> =
1);
// count loop
for (int i = 42; i> 0; i--) {
System.out.println ("still" + i);
}
Task 2: The following Nassi-Shneiderman diagram is given. First, try to find out what is output when the algorithm is executed. Then convert the given algorithm into an equivalent Java program.
Task 3: Exercise 3: grind the algorithm

