Assignment 3
Up Assignment 1 Assignment 2 Assignment 3 Assignment 4 Assignment 5 Assignment 6 Assignment 7 Assignment 8 Assignment 9 Assignment 10

 

Advanced Control: Do/while and Switch Statements

Due: Monday, Oct 1, 5:00 PM

 

  1. Do Exercise 5.6 in the text as a Windows Application. Specifically, use a Label component from the Toolbox to print your results.  See Section 4.12 (Pages 131-143) for an example of how to use a Label component.  (Note: you may have to size things differently from that example to get your results to fit properly.)
     

  2. Do Exercise 5.7 in the text as a Console Application.  However, you should repetitively prompt the user for which pattern she wishes to see: the user should either type "A", "B", "C", or "D" (or the lowercase equivalent).  Use a switch structure to test for each possibility, and use the default case statement to cause termination of the program.  [Note: the occurrences of "WriteLine" in the problem description should instead be "Write".]