Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a flowchart and then write a menudriven C++ program tosolve the following problem. Upon execution of the program, the menu will be displayed, properly

Develop a flowchart and then write a menudriven C++ program tosolve the following problem.

Upon execution of the program, the menu will be displayed, properly centered as shown below. You willbe using Selection Constructs and the Looping Constructs for this assignment.

Help Arithmetic Relational Logical Quit

Once the menu is displayed, the user is prompted for a menu selection. A wrong menu option is flagged as an error and the menu is displayed again.

H or h (for Help) will briefly explain the problem being solved and the purpose of each menu options.Once the user strikes a key, the menu will appear again.

A or a (for Arithmetic) will prompt the userfor two integer numbers followed by an arithmetic operation to be performed according to the following convention. If the user inputs 1 for the operation, the subtraction operation will be performed. If the user inputs 2,a division operation will be performed. Any other number should be flagged as an error and the user is prompted again for the operation. At no time the program will be terminated. You will decide the output format to be displayed. Once the user viewed the results, striking a key will display the menu and the user is prompted again for a menu selection.

R or r (for Relational) will prompt the user for two integer numbers followed by a relational operation to be performed according to the following convention. If the user inputs 1 for the operation, the equality (==) will be performed. If the user inputs 2, the inequality (!=) operation will be performed. Any other number should be flagged as an error and the user isprompted again for the operation. At no time the program will be terminated. You will decide the output format to be displayed. Once the user viewed the results, striking a key will display the menu and the user is prompted again for a menu selection.

L or l (for Logical) will prompt the user for two integer numbers followed by a logical operation to be performed according to the following convention. If the user inputs 1 for the operation, the logical not operation (!) will be performed on the first integer. If the user inputs 2, the logical AND will be performed between the two integer numbers. Any other number should be flagged as an error and the user is prompted again for the operation. At no time the program will be terminated. You will decide the output format to be displayed. Once the user viewed the results, striking a key will display the menu and the user is prompted again for a menu selection.

Q or q (for Quit) will clear the screen and terminate the program.

You need to run the program four imes for the numbers shown below.

First number Second number

10 10

10 20

0 2

0 0

Hints:

1. Your program will only have one main() function, one return statement, and anything declared globally, like #include . You will have one .cpp file.

2. Make sure your program executes correctly

3. Make sure the variables are correctly declared without any conflicts with other variables. You may have tochange some of the variables to make each variable unique.

4. You need to run the program four times for the numbers shown below.

5. Use conditional constructs and looping constructs (like if, ifelse, etc while, dowhile, etc) for thisassignment.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How was your life influenced by those events?

Answered: 1 week ago

Question

Which of these influenced your life most dramatically?

Answered: 1 week ago