Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are creating a program that will take number of inputs (student name and student grades) and then calculate the first quartile. The follow shows

image text in transcribedimage text in transcribedimage text in transcribed

You are creating a program that will take number of inputs (student name and student grades) and then calculate the first quartile. The follow shows the example of how to get the first quartile. Ex:1432 The first quartile is (1+2)/2=1.5 Ex: 143325 The first quartile is (1+2)/2=1.5 Ex: 1434256 The first quartile is 2 Ex: 7234516 The first quartile is 2 From above example, the quartile must comes from a sorted series. In this question, for a list of data, you need to use vector. Using array will lose points. Two functions are defined and required in order to show the result. In addition to these two defined functions, you can add other function to help your calculation. Two function defintions: void highQuartile(vector studentGrade, vector studentName, float \&quartile, string \&calByStudent1Name, string \&calByStudent2Name) void printStudent(vector studentGrade, vector studentName) The "highQuartile()" will use the pass-by-reference to return the high (first) quartile value and the names of the students whose grades are used for getting the quartile value. In the proaram, these values are used to print out the following results in the main0. High Quartile is 1.5 The number is calculated by Student Alex and Student Bob The "printStudent0" will print out all the student's name and grades as follows: Seat: 0 Name: Alex Grades: 1 Seat: 1 Name: Bob Grades: 2 Seat: 2 Name: Calvin Grades: 3 Seat: 3 Name: Mary Grades: 4 Keep in mind Seat number is the index. To calculate quartiles, you need to input at least four students. Please enter number of students 2 Please enter number of students 3 Please enter number of students 4 Please enter student's name Alex Please enter student's grades 1 Please enter student's name Bob Please enter student's grades 2 Load default template

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions