VIP: First 8 weeks web page. Java is comprehensive and the skills are cumulative, so be sure to review all material often!
Why the following coding pattern is sometimes ideal to utilize: if ( A ) A stuff else if ( B ) B statements else if ( C ) C statements else if ( D ) D statements
Was it a made shot???. Correcting some possibly incorrect information related to this issue.
Monday, April 21st: V pattern printing version 2. Notice how it is done with FEWER prints. This is closer to how you would do it on a canvas! Build up the entire string for one line of output, and then either System.out.println() it or else new Text( myLine, x, y, canvas); it.
We modified the example so it printed the movie name vertically, and further modified so it printed it vertically using a staircase, staggered pattern for the letters.
Vertically Staircase ---------- --------- G G h h o o s s t t b b u u s s t t e e r r s s The 2nd, staggered staircase solution required a nested loop structure and introduced the Java for loop construct for the implementation of the inner loop. The inner loop printed the leading spaces: 1 for the G, 2 for the h, 3 for the o, 4 for the s, 5 for the t, ... and 12 for the s.