CSC126

Lab Assignment # 1

 

 

I.              Write a C++ program that prints out the following menu for a game:

 

 

***************************************************

          Welcome!

 

Please choose a number from the following options:

 

1.    Play the game!

2.    Demo the game!

3.    Exit

 

           

****************************************************

 

 

 

II.            Modify your program from Part I, in the following way.

 

A.           Instead of simply having the message Welcome!, have the welcome message use the user’s name.  Prompt the user for a name and then have a personalized welcome message.  IF the user inputs the name Sue, the welcome message might say, “Welcome, Sue!”

 

B.           Allow the user to personalize the look of the menu.  Before you print out the menu, prompt the user for a character to be used for the menu border.  Then, use that character instead of the asterisk (*) so that the menu is personalized.

 

C.           Instead of ending the program with the final line of asterisks print a message to the user stating which menu number choice he/she has chosen.  For example, if the user inputs a 1, a message should be printed. 

You have chosen a 1.

D.           Complete the border of the menu so that it forms a square around the banner instead of just a line above and below.