2023 Create a program that will display a menu to the user The choices should be as follows | Assignment Collections
Computer Science 2023 Create A Program That Will Display A Menu To The User C++ Solution
2023 Create a program that will display a menu to the user The choices should be as follows | Assignment Collections
Create a program that will display a menu to the user. The choices should be as follows:
1) 1) Enter 5 student grades
2) Show student average (with the 5 grades)
3) Save grades (save the 5 grades only to the file)
4) Load grades (read 5 grades from a file)
5) Exit
Use a switch statement for the menu selection and have it pick the appropriate function for the menu choices. Each option should be implemented in its own function. Initialize the grades randomly between 0-100. So if the user select show student average as their first choice, there will be some random grades in the list already.
Function1 : Ask the user for 5 grades and place them into 5 variables that should be passed in as parameters, validate that the grades are in the range between 0-100 (use a loop).
Function2: Calculate the average of the 5 grades passed in and display the average with 1 decimal place and also display the letter grade.
Average
Letter Grade
90 – 100-A
80 – 89-B
70 – 79-C
60 – 69-D
Below 60-F
Function3: Write the 5 grades to a file called “myGrades.txt” Make sure to include an if statement in case the file is not able to be opened and give an appropriate error message.
Function4: Read 5 grades from a file called “myGrades.txt”. Make sure to include an if statement in case the file does not exist and give an appropriate error message.
Use a loop to repeat the entire program until the user hits 5 to exit.
Read more: http://www.justanswer.com/homework/8s8j8-create-program-will-display-menu-user.html#ixzz3KCJZnZDp
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.