help with c++ code
C:\Users\kiran\Downloads\H5 ELET 2300-03 Spring 2018.docxx, FA: 03/11/2018 Spring 2018, H5 - 1
ELET 2300-03 Homework No. 5 Dr. F. Attarzadeh
60 Points Due 03/27/2018 03/11/2018
Midterm Exam, Thursday March 22, 2018
It is very important that you read the notes at the end of each assignment for this and all other assignments.
Develop a flowchart and then write a menu-driven C++ program that uses selection and repetition constructs as needed, and several user-defined functions to solve the following problem. Upon execution of the program, the program displays a menu as shown below and the user is prompted to make a selection from the menu. The menu options are shown below.
Help MulDoubles SubIntegers Quit Once the menu item is selected and validated, the program will proceeds with processing that selection as explained below. If the user selects h or H, a user-defined function help() will be invoked. The function displays a help
screen for the user. The help should tell the user how the program operates and what is needed from the user and how to terminate the program. Once the user viewed the help screen, striking any key will clear the screen followed by display of the menu again in function main(). (see the clearscreen problem discussed in class.) If the user selects m or M, the program invokes the function MulDoubles(). Inside function MulDoubles(), the user is prompted for two numbers of type double. The function computes the
product and returns the result to the function main() where the operands and the product are displayed. If the two double numbers are 51.63 and 23.45, then the result is displayed as shown below.
The product of 51.63 * 23.45 = 1210.7235
Use appropriate formatting flags to show four digits after the decimal point. Once the user viewed the result, striking any key will clear the screen followed by display of the menu again in function main(). If the user selects s, or S, the user is prompted for two numbers of type integer. This option will then pass the two numbers to the function subIntegers() and the function computes the difference and returns the result to the function main() where the operands and the difference will be displayed. If the two integer numbers are 20 and 10, then the result is displayed as shown below. The difference of 20 - 10 = 10
C:\Users\kiran\Downloads\H5 ELET 2300-03 Spring 2018.docxx, FA: 03/11/2018 Spring 2018, H5 - 2
Once the user viewed the result, striking any key will clear the screen followed by display of the menu again in function main(). If the user selects q or Q, the program invokes the function quit() where the following message is displayed and the program is then terminated. The program will be terminated in function main(). The program terminated per the user request…
Any other menu item must be flagged as an error and the user is warned to make another selection from the menu, and the menu is displayed again. The wrong choice should not terminate the program. Once the program begins execution, it will not terminate until the user inputs q or Q.
For data of type float, check your program with following sets of data:
32.5, 6.4
-82.36, 35.15
-23.33, -49.25
For data of type integer, check your program with the following sets of data:
-40, 20
-45, 82
31.6, -5.65
Grading: Flowchart 10 points
Meaningful Documentation 10 points
Program execution without error 30 points, this includes proper use of function prototyping and
definition and documentation
Program logic and correct output 10 points
C:\Users\kiran\Downloads\H5 ELET 2300-03 Spring 2018.docxx, FA: 03/11/2018 Spring 2018, H5 - 3
Notes:(please read very carefully)
1. We need to see your flowchart before we can help you with your code.
1a. Make sure your media is VIRUS FREE! (grade of 0 will be given for infected media). 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 and the
guidelines.
6. NO global declarations of VARIABLES allowed in any program that you develop in this course.
7. Illegal menu items must be handled properly without terminating the program.
8. Full function prototyping is required. Functions must have their purposes fully explained. Functions may call other functions
to facilitate your solution.
8a. 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
H5NAME.docx. The source file for H5NAME.cpp and the Visio 2013 file H5NAME.vsdx will be uploaded as well. Homework
must be uploaded to the Blackboard by 9PM of the due date and late homework will not be accepted.
9. Use Microsoft Visual Studio Enterprise 2015 compiler using default compiler settings and set for Win32 Console Application.
10. Use Microsoft Visio 2013 to develop your flowchart.
11. Your program will work for any set of numbers.
12. Adherence to the ANSI C++ required.
13. Do not use <stdio.h>, <cstdio>, and <conio.h> in this assignment and all other assignments.
14. Do not use any #define in your program until the time that is required for class declaration header files.
15. No goto statements allowed in any program that you develop in this course.
16. Non-compliance with these notes will cost you points.
17. No collaboration on this assignment and all other assignments allowed. If you violate this policy, your grade for
the course will be F.
18. Refer to the discussion in class regarding the design of a menu.
19. The guidelines for submitting homework must be followed or your homework will not be graded.