Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

lets the answer be based on my specific code ive provided in c++. other codes eont be helpful the program is supposed to read from

lets the answer be based on my specific code ive provided in c++. other codes eont be helpful the program is supposed to read from my input file and do the following 1) print out the original data in the file without doing anything to it. 2) an ordered list of all students names (last names) alphabetically and the average GPA of all student togther . 3) freshman list in alphabeticalorder by last name with the average GPA of the freshmen togther . 4) sophomore list in alphabetical order by last name with the average GPA of the sophomores togther . 5)The junior list in alphabetical order by last name with the average GPA of the juniors. 6)The senior list in alphabetical order by last name with the average GPA of the seniors. _______________________________________________ my input file is below _________________ Williams,Leonard Freshman 1.85 Smith,Sheila Senior 2.99 Anderson,Andy Sophomore 3.01 Wiser,Bud Freshman 4.00 Robertson,Jully Junior 2.78 Koran,korn Junior 3.50 smith,sam Junior 2.14 Johnson,Jim Junior 3.05 Johnson,Jane Junior 3.75 Potter,Pam Senior 2.98 Brown,Bill Sophomore 2.55 Crooks,Cathy Freshman 1.99 Gregg,Howard Senior 2.44 Nicholas,Judy Senior 3.69 White,Bob Sophomore 1.64 Walsh,Fred Junior 4.00 Dennis,Susan Senior 2.06 Roberts,Rachel Sophomore 4.00 Fredericks,Mary freshman 2.89 Holmes,Wendy Senior 2.56 Edwards,James Sophomore 3.00,Barbara Sophomore 3.67 Brown,David Freshman 2.00 Williamson,Walt Sophomore 2.95 Carson,Jim Sophomore 2.03 This is my code its only outputting like three things. #include #include #include using namespace std; class A{ public: string name; string level; string Gpa; public: void SetName(string t); void SetLevel(string t); double SetGpa(int a [],int n); void print(){ cout>line){ myArray[i]=line; i++; for(int i=0;i>myArray[i]; } cout

complete code based on requirements and input file. what am i missing
this is my code its outputting an empty blank.
image text in transcribed
image text in transcribed
image text in transcribed
d Text Run Diagnostics View Window Help 100% EN Untitled 9.cpp - Edited Sat 11:31 AM 7 days left-Buy Now Binclude include using namespace std; class Student public: Student) friend istream& operator >>(istream Ginput, studente student); friend ostreant operator >(istrean input, Studente student) { input >> student.name >> student level >> student.pa; return input; } ostream operator >a) { student (1) 1++; for(int 1=0;istudent[j].name) tempestudent (1): student[i]-student(s); student[] tempi }}}}} Hun Succeeded Time 27 ms Peak Memory 720K Student Tabs: 4 Line 20, Column 1

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_2

Step: 3

blur-text-image_3

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions