Write a C++ program that takes as inputs from a teacher, the names of her/his students...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program that takes as inputs from a teacher, the names of her/his students along with the grade of each student in an exam. Define a struct with two fields: Name and Grade. In your program, the main function creates an array of this struct to store the students' data. All grades are integers that have to be in the range from 0 to 100 (inclusive). Assume no two grades have the same value and there are at least six students in the class. At the beginning, you will need to ask the teacher for the size of the class (the number of students) and use dynamic memory allocation to create the array. The program will display (as its outputs) the following: 1. The average and median of the students' grades. 2. The name and grade of the three students with the maximum three grades. 3. The name and grade of the three students with the minimum three grades. Each one of the above four outputs must be implemented in a separate function where the array is passed to these functions as a parameter. Do not use any global variables in your program. Write a C++ program that takes as inputs from a teacher, the names of her/his students along with the grade of each student in an exam. Define a struct with two fields: Name and Grade. In your program, the main function creates an array of this struct to store the students' data. All grades are integers that have to be in the range from 0 to 100 (inclusive). Assume no two grades have the same value and there are at least six students in the class. At the beginning, you will need to ask the teacher for the size of the class (the number of students) and use dynamic memory allocation to create the array. The program will display (as its outputs) the following: 1. The average and median of the students' grades. 2. The name and grade of the three students with the maximum three grades. 3. The name and grade of the three students with the minimum three grades. Each one of the above four outputs must be implemented in a separate function where the array is passed to these functions as a parameter. Do not use any global variables in your program.
Expert Answer:
Answer rating: 100% (QA)
The C program that fulfills the requirements you specified The program uses dynamic memory allocation to create an array of student data calculates th... View the full answer
Related Book For
Introduction To Statistics And Data Analysis
ISBN: 9780495118732
3rd Edition
Authors: Roxy Peck, Chris Olsen, Jay L. Devore
Posted Date:
Students also viewed these programming questions
-
Write a literature review for your study. See below for an example of a literature review. Your literature review should provide both analysis and synthesis of previous studies as related to the...
-
Maicom Construction Materials Inc. , hereinafter referred to as "MCM", is a construction materials company established in Moncton, New Brunswick. Its facilities (warehouse, store and offices) are...
-
The creationists have no right to impose their mistaken, ignorant, superstitious beliefs on others. They claim the constitutional right to the free exercise of religion. How about the rights of the...
-
Find all points at which the mapping is not conformal. Give reason.
-
Keurig Green Mountain is a specialty coffee company. It sources, makes, and sells coffee, hot cocoa, teas, and other beverages under various brands in portion packs for its Keurig brewing system. The...
-
What are the major implications for the business manager if an assessment of current practices indicates substantial inconsistency in the information vision and IT architecture for the company? What...
-
11. The current in a metallic conductor is plotted against voltage at two different temperatures T and T2. Which is correct :- Current 2 (1) T Voltage (2) T
-
1. The weights of all babies born at a hospital have a mean of 7.4 pounds and a standard deviation of 0.66 pounds. Assuming (n/N less than 0.05), the standard deviation of the sampling distribution...
-
Prove the following theorem by contradiction (M 0 such that f(x) M whenever 0 < x-cl < 8. Then, if lim f(x) exist and is equal to L, L M. X-C
-
Pick a product that appears to be increasing in price right now due to inflation or holidays or whatever. Build a model that shows potential cost of the product, and the target profit margin. Then...
-
The steel beams of the Space Needle rise to a height of 180 meters on a 0.0C winter day. How much taller is the Space Needle on a day when the air temperature is 20C.
-
Your father owns a small family business but he is of the opinion that he does not have to be concerned about economics as it is a government related matter. As a student exposed to the scope of...
-
A shovel of sand is thrown into a toy rail road car standing on a level frictionless track. If the sand has a mass ms = 1180 g and is thrown with a velocity v = 5.7 m/s, how far up in height in...
-
The Canadian Ministry of Health seeks to design a comprehensive program to Improve the health conditions of the community. For this reason, it is necessary to properly estimate the amount of vitamin...
-
Tim Stokes recently invested $325,000 to acquire the RockOyster, a restaurant on Vancouver Island. RockOyster meals sell for an average of $30 and the average variable cost per meal is $8. Tim...
-
Select the correct answer for each of the following questions. 1. On December 31, 20X3, Saxe Corporation was merged into Poe Corporation. In the business combination, Poe issued 200,000 shares of its...
-
The article Cost-Effectiveness in Public Education (Chance [1995]: 3841) reported that for a regression ofy = average SAT score on x = expenditure per pupil, based on data from n = 44 New Jersey...
-
Data on self-esteem, leadership ability, and GPA were used to compare college students who were hired as resident assistants at Mississippi State University and those who were not hired (Wellness as...
-
The paper Root Dentine Transparency: Age Determination of Human Teeth Using Computerized Densitometric Analysis (American Journal of Physical Anthropology [1991]: 2530) reported on an investigation...
-
Ram Lakhan Company Ltd. produces one unit of product B by using one unit of raw material A. During 200506 A costed the company 4,200. Conversion cost was 850. As on 31st March 2006, being the...
-
Usha Corporation Ltd. sought the advice of an investment advisor for deployment of surplus funds of around Rs. 45 lakh in the stock market. The advisor advised to invest in Bhonsle India Ltd. and...
-
Bharti Investments Ltd. holds 8000 shares of Phonetel Corporation Ltd. It acquires 7000 shares of Subharti Ltd. from Idea Investments Ltd. in exchange for these shares. Determine the cost of shares...
Study smarter with the SolutionInn App