you will write a complete C++ program that will display a menu and based on user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
you will write a complete C++ program that will display a menu and based on user input, perform a variety of operations to process the grades using structures. This is an individual work. Program Requirements: • As with all homeworks in this course, your program's output will display your name, your EUID, your e-mail address, the department name, and course number. This means that your program will print this information to the terminal (see Sample Output). Your program is to use a data structure (called Student) to read and store student's grade information: oid (int): student id first (string): first name last (string): last name exam1 (int): exam 1 score exam2 (int): exam 2 score o o exam3 (int): exam 3 score o mean (float): mean/average of the three exams • You will need to create an array of students of 20 students. You will also need an index counter variable to count the number of students added in the array. • In a loop of your choice, you repeatedly display a menu of options until the user enters the selection to terminate the program as follows: 1. Display list of students' information 2. Add new student 3. Update existing student 4. Compute mean of the exams 5. Compute minimum of the mean of the exams 6. Compute maximum of the mean of the exams 7. Exit program. • Although you may assume that the user enters an integer in response to this menu, the integer may be out of range. If the user enters an invalid menu option (i.e., not an integer between 1 and 7, inclusively), your program will display an error message and re-display the menu. • If the user enters an integer between 1 and 7, inclusively, then your program will perform the requested operation as follows: 1. Display list of students' information You will display all the attributes (data member values) of the students. 2. Add new student You will prompt for and read in all the data member values of the student, append the student information in the array, increase the student index counter, and then display a status message indicating that the student was just added to the array. 3. Update existing student You will prompt for and read in the student id to update the student's information, perform a sequential search in the array to find the student by its id: • If the student id is found in the array, then you will prompt for all the data member values except the student's id, update the student's information in the array, and display a status message indicating student's information was updated. If the student id is not found, then display a status message indicating that the student was not found. . 4. Compute mean of the exams You will compute the accurate mean/average of the mean of the exams of all the students in the array and display the result. 5. Compute minimum of the mean of the exams You will find the minimum value of the mean of the exams of all the students in the array and display the result. 6. Compute maximum of the mean of the exams You will find the maximum value of the mean of the exams of all the students in the array and display the result. 7. Exit program You will display a meaningful message that the program is terminating and exit the program. After performing the above operations and printing the results, you will re-display the menu and accept new user input, thus repeating the process (except in the case of option 7 where the user wants to terminate the program). • You will perform needed error handling, such as attempting to perform an operation on an empty list by displaying an error message instead of actually performing the operation (see Sample Output). • Your program will also be graded based upon your program style. This means that you should use comments (as directed), meaningful variable names, and a consistent indentation style. • Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date, and brief description), comments for each variable, and commented blocks of code. Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cell01, cell02,..., cell06), so you should make sure that your program compiles and runs on a CSE machine. No regular or late credit will be given for any program that does not compile and run on the CSE Linux servers. • See the Sample Output for questions on the program's expected behavior. You should contact your instructor if there is any question about what is being asked for in this programming assignment. • Hint: Break the programming into smaller phases/functions. First, write code to show menu and implement loop to read user's input. Then add code/functions to add student and display all the students' information. Next, add code/function to update existing student's information. Finally, add code/functions to compute mean, minimum, and maximum of the mean of the exams. you will write a complete C++ program that will display a menu and based on user input, perform a variety of operations to process the grades using structures. This is an individual work. Program Requirements: • As with all homeworks in this course, your program's output will display your name, your EUID, your e-mail address, the department name, and course number. This means that your program will print this information to the terminal (see Sample Output). Your program is to use a data structure (called Student) to read and store student's grade information: oid (int): student id first (string): first name last (string): last name exam1 (int): exam 1 score exam2 (int): exam 2 score o o exam3 (int): exam 3 score o mean (float): mean/average of the three exams • You will need to create an array of students of 20 students. You will also need an index counter variable to count the number of students added in the array. • In a loop of your choice, you repeatedly display a menu of options until the user enters the selection to terminate the program as follows: 1. Display list of students' information 2. Add new student 3. Update existing student 4. Compute mean of the exams 5. Compute minimum of the mean of the exams 6. Compute maximum of the mean of the exams 7. Exit program. • Although you may assume that the user enters an integer in response to this menu, the integer may be out of range. If the user enters an invalid menu option (i.e., not an integer between 1 and 7, inclusively), your program will display an error message and re-display the menu. • If the user enters an integer between 1 and 7, inclusively, then your program will perform the requested operation as follows: 1. Display list of students' information You will display all the attributes (data member values) of the students. 2. Add new student You will prompt for and read in all the data member values of the student, append the student information in the array, increase the student index counter, and then display a status message indicating that the student was just added to the array. 3. Update existing student You will prompt for and read in the student id to update the student's information, perform a sequential search in the array to find the student by its id: • If the student id is found in the array, then you will prompt for all the data member values except the student's id, update the student's information in the array, and display a status message indicating student's information was updated. If the student id is not found, then display a status message indicating that the student was not found. . 4. Compute mean of the exams You will compute the accurate mean/average of the mean of the exams of all the students in the array and display the result. 5. Compute minimum of the mean of the exams You will find the minimum value of the mean of the exams of all the students in the array and display the result. 6. Compute maximum of the mean of the exams You will find the maximum value of the mean of the exams of all the students in the array and display the result. 7. Exit program You will display a meaningful message that the program is terminating and exit the program. After performing the above operations and printing the results, you will re-display the menu and accept new user input, thus repeating the process (except in the case of option 7 where the user wants to terminate the program). • You will perform needed error handling, such as attempting to perform an operation on an empty list by displaying an error message instead of actually performing the operation (see Sample Output). • Your program will also be graded based upon your program style. This means that you should use comments (as directed), meaningful variable names, and a consistent indentation style. • Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date, and brief description), comments for each variable, and commented blocks of code. Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cell01, cell02,..., cell06), so you should make sure that your program compiles and runs on a CSE machine. No regular or late credit will be given for any program that does not compile and run on the CSE Linux servers. • See the Sample Output for questions on the program's expected behavior. You should contact your instructor if there is any question about what is being asked for in this programming assignment. • Hint: Break the programming into smaller phases/functions. First, write code to show menu and implement loop to read user's input. Then add code/functions to add student and display all the students' information. Next, add code/function to update existing student's information. Finally, add code/functions to compute mean, minimum, and maximum of the mean of the exams.
Expert Answer:
Answer rating: 100% (QA)
C include include using namespace std Define the Student structure struct Student int id string firs... View the full answer
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
The invasion of Israel by Hamas A. Using the Autocratic Leadership Style, thoroughly analyze an ethical decision facing this situation B. What conclusions can be made from the analysis? Thoroughly...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Jack owns an initial wealth (W0) of $30. Inadvertently, he agreed to enter into the following game : - With 1/4 probability his wealth goes up to $50 - With 1/2 probability his wealth stays the same...
-
Solve for y' y' = y = 71-x 3
-
Write a computer program that lists the states P, T, and v along the process curve in Problem 3.111
-
How does the treatment of medical expenses differ for AMT and regular income tax purposes? Compare the tax treatment of 2012 with that of 2013.
-
In a simple vapour compression cycle, the refrigerant is in the form of dry saturated vapour before entering (a) condenser (b) evaporator (c) throttle valve (d) compressor
-
The pretax financial income (or loss) figures for Jenny Spangler Company are as follows. 2002 .......$160,000 2003 .........250,000 2004 ...........80,000 2005 ........(160,000) 2006...
-
12 Brooklyn files as a head of household for 2023. They claimed the standard deduction of $20,800 for regular tax purposes. Their regular taxable income was $80,000. What is Brooklyn's AMTI?...
-
Ashton and Melody Webb are a married couple in their mid-20s. Ashton has a good start as an electrical engineer and Melody works as a sales representative. Since their marriage four years ago, Ashton...
-
As a laudably skeptical physics student, you want to test Coulomb's law. For this purpose you set up a measurement in which a proton and an electron are situated 881 nm from each other and you study...
-
. How is the formula for the Reynolds number derived, and what does it signify?
-
What is the price of bituminous coal per million Btu's? At $52/ton, Heat content of bituminous coal is 12,000 Btu/pound
-
Direct Material Costs by Job Job 454 442 435 432 424 381 Marks tel Automatic Color & 650 634 600 Label 560 550 Detail Tooltip SUM(DM Cost) 500 450 DM Cost F I. 400 350 300 250 200 150 100 50 0 J3 J2...
-
Describe why it can be difficult to evaluate the true financial performance of a merger post-completion?
-
The Blindjammer Co. bonds are currently selling for $1,007.27. These bonds mature in fouryears, pay interest annually, and have a yield-to-maturity of 8.63%. What is the coupon rate?
-
(i) Outline the historical origins of the derivatives markets in Chicago. [8] You are given the following information about the EURE yield curve, as at 1 April 2020. O/N T/N IWK 1 Month 3 Month Jun...
-
Determine the optimal use of Applichem's plant capacity using the Solver in Excel.
-
What is line wrapping? What are the two styles of line wrapping? How do you turn a JTextArea components line wrapping on? How do you select a line wrapping style?
-
Describe what a compiler does with a programs source code.
-
What will the following program display? public class CheckPoint { public static void main(String[] args) { int funny = 7, serious = 15; funny = serious % 2; if (funny != 1) { funny = 0; serious = 0;...
-
R-12 refrigerant belongs to which group of refrigerants? (a) halo-carbon (b) azeotropes (c) inorganic (d) hydro-carbons
-
Frosting of evaporator tubes results in (a) increased heat transfer rate (b) decreased heat transfer rate (c) increased compressor pressure (d) decreased compressor pressure
-
The bank of tube at the back of a domestic refrigerator of vapour compression type is (a) evaporator (b) condenser (c) capillary (d) electric wire
Study smarter with the SolutionInn App