Reference no: EM133398488
Your header comment is to include the following information (P4):
A title stating "Your Name Assignment 2"
Name of Project:
Purpose:
Revision History:
Ensure you are using proper programming conventions. For example, proper variable naming, indenting, grouping, etc. Deductions will be made for each style mistake.
When complete, submit a single compressed (.zip format) file containing the entire project folder for both programs, and upload the zip file to the "Assignment 3" dropbox in the class portal.
PROGRAM REQUIREMENTS
Create console-based program that presents the user with a menu of three options. Each menu option will perform a series of calculations, as noted in the instructions below.
Program Logic
Present your user with a menu of 3 options using a do loop.
Any invalid option entered by the user should re-display the menu.
Encapsulate the logic of Option 1 and Option 2 within their own method.
Proper error handling and appropriate error messages should be displayed.
Option 1 - Display a list of 10 sequential numbers that have their values manipulated as noted below, starting from a number that the user specifies.
Start by asking the user for a starting number. Any string entry by the user, in place of the expected numeric value should not crash the program.
Use a for loop to increment through the numbers, beginning with and including the starting number.
For each number multiply the even ones by 3 and multiply the odd numbers by 4.
Display the result of each calculation.
Option 2 - This option should be created using a while loop. The option should present the user with an arithmetic problem (e.g., What is 3 + 8?) and asks for the answer from the user.
The integer numbers for the arithmetic problem should be generated randomly.
Keep presenting the question to the user until they get it right. Then give them a success message.
After the get the correct answer ask the user if they would like another question. Give them another question if the user enters "Yes". If the user enters "No" return to the original menu.