Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is my code. its supposed to read from the text file and save it into an class of array and output it into accending

image text in transcribedimage text in transcribedimage text in transcribed

this is my code. its supposed to read from the text file and save it into an class of array and output it into accending order and then break into groups based on their class standing and their avg gpas and were using operator overload. I run my code and its blank and i dont know how to output them into groups based on their standing with the gpas. please answer based on my code and any suggestions/fixes are on my code. dont output other codes or things that dont directly help me.

text file

image text in transcribed

d Text Run Diagnostics View Window Help >) 100% 242 Sat 11:32 AM Q E 7 days left - Buy Now Untitled 9.cpp - Edited Run Back/Forward View Untitled 9.cpp Stop Run Settings.. prog.cpp 59 70 71 72 Untitled 8.cpp myfile.close(); //gpa 73 74 75 double sum=0; for (int i=0;istudent[j].name) { temp=student[i]; student[i]=student[j]; 89 90 91 92 93 94 student[j]=temp; } 95 96 97 }}}}} Run Succeeded Time 27 ms Peak Memory 729K F Student Tabs: 4 Line 20, Column 1 A nd Text Run Diagnostics View Window Help 100% L2 Untitled 9.cpp - Edited Sat 11:32 AM Q E 7 days left - Buy Now - Back/Forward View + Run Stop Run Settings.... prog.cpp Untitled 8.cpp Untitled 9.cpp 38 39 int main() { //reading txt file 40 41 42 43 int i; Student a; Student student [25]; 44 45 46 ifstream myfile("College.txt"); 47 48 49 if (myfile.is_open() { 50 51 52 while(myfile>>a){ 53 54 student[i]=a; i++; 55 56 57 58 mmmmmmmmwwmwww88w88w83868w, 59 for(int i=0;i 2 #include #include 1 3 4 5 6 using namespace std; 7 8 class Student{ 9 10 11 public: Student({} friend istream& operator >>(istream &input, Students student); friend ostream& operator >(istream &input, Student& student){ ** input>> student.name > > student.level >> student.Gpa; return input; } 28 29 30 31 32 33 34 ostream& operator

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

More Books

Students also viewed these Databases questions

Question

7. Determine what feedback is provided to employees.

Answered: 1 week ago