Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a C++ program to read a given data file (scores.dat) which contains n names and scores of a class, then determine the letter grade

Create a C++ program to read a given data file (scores.dat) which contains n names and scores of a class, then determine the letter grade using favorable grading scheme as follows for each student and display the class grade roster.

In the data file, the first entry is firstname, the second entry is lastname and the third entry is the score. Your program should use the following global declaration:

image text in transcribed

image text in transcribed

image text in transcribed

The favorable grading being used in the class means that your final grade would be the better grade of the two grades as long as the total accumulated points is above 60 points (the BAR). If the total accumulated points is below 60, then the Point Cutoff (College Grade Scale) will be used to determine the letter grade (it is an F). For example, a student, John Doe, has earned 72 points in total (C- according to the point cutoff), but is ranked at 76% percentile in the class (Aaccording to the curve cutoff), then John Doe will receive A- (a better grade of two) as the final grade. If another student, Mary Doe, has earned 91 points in total (A- according to the point cutoff), but is ranked at 73% percentile in the class (B+ according to the curve cutoff), then Mary Doe will receive A- (a better grade of two) as the final grade. If a student, Mike Doe, has earned 59 points in total, then the Mike Doe will receive F regardless the curve grade.

image text in transcribed

The output should look like below:

image text in transcribed

The test file is as follows: it will work if you copy and paste it into a notebook.

Eris Ahmetaj 68.24792627 Ashley Altomare 70.63162555 Magdalena Angelova 78.68855155 Michael Au 24.58952983 Jessica Aucaquizhpi 80.9651312 Ido Ayalon 58.44440228 Katarzyna Bagan 23.27771334 Kai Bakari 13.64586785 Anthony Bontatibus 40.46117218 Mackenzie Brown 19.09693455 Hung Cheung 61.5047475 Christopher Clark 22.82352941 Michelle Dai 16.84739022 Reynalyn Ella 66.64383415 Laura Enriquez 86.94117286 Anthony Esposito 72.9643276 Brian Facchin 28.48925021 Alexander Faisaly 68.98533298 John Farren 19.03065452 Tiago Ferreira 9.235294118 Max Gendler 67.96200054 Heather Getzinger 75.43251351 Lucia Gualan 55.84506415 Hermes Hamanot 21.47307374 Chetan Jagota 58.8054209 Nato Jangirashvili 54.95808485 Elisa Jean-leger 53.74135169 Danielle Jones 54.86847077 Anna Kashcheeva 58.81138069 Hanna Kasper 88.63630614 Romin Kershaw 63.62543833 Andrew Kim 19.24490472 Michelle Kot 51.9384831 Manwa Lam 52.15395319 Jennifer Lee 17.73653687 Min Lee 13.39705882 Andrew Li 39.34241922 Tommy Li 73.44118614 Andrew Lim 79.01404897 Hao Liu 74.36793946 Reginald Lominy 19.9907208 Elizabeth Lopez 17.74366197 Angie Lora 31.11374275 Alexander MakhiniaJr 92.62970814 Andresfelipe Mateusfajardo 31.63529412 Leo Mcfarlane 13.38455882 Adam Menken 58.212755 Leslie Mercedes 63.34457879 Miguel Meza 36.70836785 Na Miao 60.89740659 ChunJie Nan 62.31530921 Rosalie Nash 41.55579651 Tiffany Naula 19.54830157 Yareli Peralta 20.17776512 Francis Pho 62.63719346 Francisco Prieto 65.84856728 Kinga Pytko 74.04376611 Carolina QiuChen 30.88513877 Fadil Rahman 66.42208069 Ayman Razzaque 64.62214756 Elizabeth Rodriguez 28.47743323 Jonathan Selegean 51.20375414 Tal Shpatz 53.24363061 Julia Sinyavsky 14.88980944 Ilya Titov 71.10310654 Zita Tlupova 28.03562552 Jasmin Torres 86.30281919 Adam Vajdak 74.4810933 Jason Valladolid 54.50851482 Peter Vulaj 52.59323335 Wenjie Wang 48.50381797 Leah Wirth 68.41188217 Filip Wisniewski 80.62604983

Thank you!

const int MAXSTUDENT = 100; const int BAR60; enum GRADE (F, D, CMINUS, C, CPLUS, BMINUS, B, BPLUS, AMINUS, A; Then, your program should use class. One class is Student, so that each student contains its personal data as follows: class Student private: string nameFirst; string nameLast:; double rawScore; double percentRank; GRADE pointGrade; GRADE curveGrade; string letterGrade; public: void setFirstName (string s) nameFirsts; void setLastName (string s) nameLast s; void setRawScore (double s) rawScore - s; void setPercent(double p) percentRankp; void setPointGrade (GRADE g) pointGrade-g; void setCurveGrade (GRADE g) curveGrade-g; const int MAXSTUDENT = 100; const int BAR60; enum GRADE (F, D, CMINUS, C, CPLUS, BMINUS, B, BPLUS, AMINUS, A; Then, your program should use class. One class is Student, so that each student contains its personal data as follows: class Student private: string nameFirst; string nameLast:; double rawScore; double percentRank; GRADE pointGrade; GRADE curveGrade; string letterGrade; public: void setFirstName (string s) nameFirsts; void setLastName (string s) nameLast s; void setRawScore (double s) rawScore - s; void setPercent(double p) percentRankp; void setPointGrade (GRADE g) pointGrade-g; void setCurveGrade (GRADE g) curveGrade-g

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions