[Solved] CS-1410-project 2 -VectorsAndArrays

$25

File Name: CS_1410_project_2__VectorsAndArrays.zip
File Size: 329.7 KB

SKU: [Solved] CS-1410-project 2 -VectorsAndArrays Category: Tag:
5/5 - (1 vote)

6.19 Programming Project #2:Vectors and ArraysBackgroundThe standard C++ library contains a container class called vector. The vector classworks very much like lists in C#, Java, and other languages. In C++, generic collectionclasses are created using templates, which well see at the end of the course.ObjectiveAt the completion of this project, you will have created an application that: Gets a variable amount of input from the user, Uses a vector to store data, and Uses functions that you wrote.Project Find the Median and Record theGradeProfessor Dolittle has asked some computer science students to write a program thatwill help him calculate his final grades. Professor Dolittle gives two midterms and a finalexam. Each of these is worth 100 points. In addition, he gives a number of homeworkassignments during the semester. Each homework assignment is worth 100 points.At the end of the semester, Professor Dolittle wants to calculate the median score onthe homework assignments for the semester. He believes that the median score is agood measure of the students overall performance on the homework assignments. Themedian is found by putting the homework scores in order, and then taking the scorethat is at the midpoint of this list. If there are an odd number of assignments, themedian is the score exactly in the middle of the list. If there are an even number ofassignments, the median is the average of the two scores closest to the midpoint of thedata.Once the median score is known, professor Dolittle takes the sum of the exam scoresand the median homework score and uses this value to compute a letter grade. Thesum is is truncated to the next integer down if it has a fraction (so 180.7 is a 180 forgrading purposes). Letter grades are assigned based on the following table:

Program RequirementsYour program should work as follows:1. All user input should be tested to be sure that it is a valid integer value in therange 0 to 100.2. It should ask the user to enter in the score for the first midterm. Then this value isread in and saved.3. It should ask the user to enter in the score for the second midterm. Then thisvalue is read in and saved.4. It should ask the user to enter in the score for the final exam. Then this value isread in and saved.5. The program then asks the user to enter in the scores for the homeworkassignments. Any number of scores can be entered in. You will test for a -1entry to stop adding to the vector.6. Store the homework scores in a vector.7. Once all of the data has been entered, the program calls a function that youhave written to find the median homework score.8. The program then calls a function that you have written to calculate and returnthe letter grade. The return grade is based upon the total of the three examsplus the median homework score (total points).9. Finally, display the median homework score, the total point count, and the lettergrade.Dr. DoLittles Grading Program ..Please enter in the score for the first exam: abcSorry, your input must be an integer. Please try again.Please enter in the score for the first exam: 97Please enter in the score for the second exam: 65Please enter in the score for the final exam: 85Enter the score for a homework assignment: abcSorry, your input must be an integer. Please try again.Enter the score for a homework assignment: 200Sorry, your input must be between 0 and 100. Please try again.Enter the score for a homework assignment: 99Enter the score for a homework assignment: 65Enter the score for a homework assignment: 78Enter the score for a homework assignment: 80Enter the score for a homework assignment: -1The median homework score was 79The total points earned was 326The letter calculated letter grade is BAs a reminder, you need to place all input at once into the input window in Zylabs. Forthe example above, the input is:abc976585abc20099657880-1

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS-1410-project 2 -VectorsAndArrays[Solved] CS-1410-project 2 -VectorsAndArrays
$25