Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1 int startingValue; 2 int terminatingValue; 3 int stepValue; 4 5 for (int i - s

ID: 3701429 • Letter: 1

Question

1 int startingValue; 2 int terminatingValue; 3 int stepValue; 4 5 for (int i - startingvalue; i terminatingValue; i + stepValue) switch( i ) 7 8 9 10 case e: System.out.print( "Hello there, ") break; 12 case 1: 13 14 15 16 17 18 19 20 21 System.out.println( "What's up? "); break; case 2: System.out.println( "How are you doing? ); break; case 3: System.out.printin "Terrific. ): break; case 4 System.out.printin( "Beautiful day isn't it? "; 23 24 25 26 27 28 29 / end switch 30 end for break; System.out-printIn( "Yes it is. ") System-out.println( "See you later case 5: break; default: Question 19

Explanation / Answer

Answer:
The output of the aboce code is
"see you later."
"see you later."
"see you later."
"Hello there, "
"what's up"
"how are you doing?"

startingvalue is -3
terminatingvalue is 2
stepvalue is 1

for loop will start from -3 and stop at 2. every iteration value will increse by 1

when i = -3 default case will execute and print "see you later."
when i = -2 default case will execute and print "see you later."
when i = -1 default case will execute and print "see you later."
when i = 0 case 0 will execute and print "Hello there, "
when i = 1 case 1 will execute and print "what's up"
when i = 2 case 2 will execute and print "how are you doing?"