Question: For the following two questions you must document you programs properly. 10% of the mark is allocated for comments. Comment should include a brief description
For the following two questions you must document you programs properly. 10% of the mark is allocated for comments. Comment should include a brief description at the top of the program stating what the program does. (16) (10 marks) Write a MATLAB script to do the following: 1) The following information is displayed on the computer screen and the user is prompted to make a menu selection: Make a selection for the following: Select 1 to play a game. Select 2 to continue a previous game. Select 3 to exit. Enter your selection: 2) Using the switch/case structure, the following will be displayed: a. If'1' is selected, display 'Play game!' b. If "2' is selected, display Continue a previous game" c. If '3' is selected, display 'Bye, bye d. For any other value, display Section not valid. Bye, bye For the following two questions you must document you programs properly. 10% of the mark is allocated for comments. Comment should include a brief description at the top of the program stating what the program does. (16) (10 marks) Write a MATLAB script to do the following: 1) The following information is displayed on the computer screen and the user is prompted to make a menu selection: Make a selection for the following: Select 1 to play a game. Select 2 to continue a previous game. Select 3 to exit. Enter your selection: 2) Using the switch/case structure, the following will be displayed: a. If'1' is selected, display 'Play game!' b. If "2' is selected, display Continue a previous game" c. If '3' is selected, display 'Bye, bye d. For any other value, display Section not valid. Bye, bye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
