Question: (a) Developaflowchartandthenwriteamenu-drivenC++programtosolvethefollowingproblem. Upon execution of the program, the menu will be displayed, properly centered as shown below. You will be using Selection Constructs, the Looping

(a) Developaflowchartandthenwriteamenu-drivenC++programtosolvethefollowingproblem. Upon execution of the program, the menu will be displayed, properly centered as shown below. You will be using Selection Constructs, the Looping Constructs, user-defined functions and references for this assignment.

Help Logical Arithmetic Relational 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 call the function help which briefly explains the problem being solved and the purpose of each menu options. Once the user strikes a key followed by the return key, the menu will appear again.

L or l (for Logical) will call the function logical which prompts 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 AND will be performed between the two integer numbers. If the user inputs any other number, the program displays a message stating incorrect operation and then will clear the screen and shows the menu. If 1 is entered again, the steps above will be repeated. At no time the program should be terminated. You will decide the output format to be displayed. Once the user viewed the results, striking a key followed by a return key will display the menu and the user is prompted again for a menu selection. You can remain in this mode if you like by adding additional logic of your design.

A or a (for Arithmetic) will call a function arithmetic which prompts the user for two integer numbers followed by an arithmetic operation to be performed according to the following convention. If the user inputs 2 for the operation, the subtraction operation will be performed. If the user inputs any other number, the program displays a message stating incorrect operation and then will clear the screen and shows the menu again. If 2 is entered again, the steps above will be repeated. At no time the program should 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. You can remain in this mode if you like by adding additional logic of your design.

R or r (for Relational) will call the function relational which prompts the user for two integer numbers followed by a relational operation to be performed according to the following convention. If the user inputs 3 for the operation, the greater than (>) operation will be performed. If the user inputs any other number, the program displays a message stating incorrect operation and then will clear the screen and shows the menu again. If 3 is entered again, the steps above will be repeated. At no time the program should be terminated. You will decide the output format to be displayed. Once the user viewed the

C:\Users\ASHOKA\Desktop\03072017\H5 ELET 2300-03Spring 2017.docxx, FA: 03/07/2017 Spring 2017, H5 - 1

results, striking a key followed by a return key will display the menu and the user is prompted again for a menu selection. You can remain in this mode if you like by adding additional logic of your design. Parameter passing to the function relational is by reference.

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

Hints:

Your program will only have one main() function and many other user-defined functions as stated above. In addition to the main() function which must have a return statement, other functions may have return statements as well. There will be one .cpp file with multiple functions.

It is essential that function declarations (prototypes), definitions, and invocations follow the instructions given in class.

Make sure your program executes correctly

Make sure the variables are correctly declared without any conflicts with other variables. You may have to

change some of the variables to make each variable unique.

Your program will terminate when the user selects Q or q.

Use conditional constructs, looping constructs, functions, and references for this assignment.

Test your program with the following sets of numbers. The program should be written such that all the stated operations will be tested with the data shown below.

First number

10 -10 -50 00

Grading: Flowchart Meaningful Documentation Program codes and execution without error Program logic and correct output formats

Notes:(please read very carefully)

Second number

40 50 0

10 points 10 points 30 points 10 points, this includes all sample runs

1. We need to see your flowchart before we can help you with your code. 1a. Make sure your files are VIRUS FREE! (A grade of 0 will be given for infected files). Use Technology lab PCs for the test. 2. Comment your program. 3. Use meaningful prompts. 4. Provide a brief description of the problem being solved. 5. Be sure to include a header file at the beginning of your program as shown in the course syllabus. 6. NO global declarations of VARIABLES allowed in any program that you develop in this course. 7. On the due date, submit your H5 containing the components of the program specified in the guidelines. Create a Word file that contains the header, the flowchart, the list of your .cpp file, and the sample runs of the program. Name this file H5AME.docx. The source file for H5NAME.cpp and the Visio 2013 file H5NAME.vsdx will be uploaded as well. Unrelated files should not be present when you upload them to the Blackboard. Homework must be uploaded to Blackboard by 9PM of the due date and late homework will not be accepted. NAME is your last name. 8. Use Microsoft Visual Studio Enterprise 2015 compiler using default compiler settings. 9. Use Microsoft Visio 2013 to develop your flowchart. 10. Adherence to the ANSI C++ required.

C:\Users\ASHOKA\Desktop\03072017\H5 ELET 2300-03Spring 2017.docxx, FA: 03/07/2017 Spring 2017, H5 - 2

11. Do not use and in this assignment and all other assignments. 12. Do not use any #define in your program until the time that is required for class declaration header files. 13. No goto statements allowed in any program that you develop in this course. 14. Non-compliance with these notes will cost you points. 15. No collaboration on this assignment and all other assignments allowed. If you violate this policy, your grade for the course will be F. 16. When copying and pasting code into a Word document, please use the Courier New font with a font size no more than 10.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!