Assignment: MenuTester

Create a MenuTester class which contains a main method. Within the main method, prompt for a menu choice. Depending on the menu choice, display a row of 10 stars (*) or 10 bars (|).

Use a do…while loop to gather a valid menu choice, and a for loop to display the specified row.

In the teacher’s model answer, there are 3 declared constants. And here’s another hint: Concatenate chars to create the row.

Sample output

The model answer was run from a command line (instead of inside the IDE). Here is a screen shot:

Need help?

Some hints are available.