Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this quest, you are going to modify quest 2 so that it saves your class roster to a file and can load from that

In this quest, you are going to modify quest 2 so that it saves your class roster to a file and can load from that file. This is quest 2 code #include #include using namespace std; #define ASSI 10 int main() { int ns,i=0, j=0, total =0,points,grade[30][10]; //variable declaration part float Avg; string students[30]; //can store 30 students string name; int assiNo =0; int assiGrade =0; char ch; string AssiName;// for edit part cout <<"Enter Assignment name"<> AssiName; while(1) // loop up to user want { cout <<"Enter the number of students in the class:"<< endl;//ask the user to enter no of students cin >> ns;//ask the user to enter no of students cin.ignore (256,' '); for(i=0;i>students[i];//enter student cin.ignore(256,' '); // for ignore cout << "Please enter grades for 10 assignments"<> grade[i][j]; //enter grade cin.ignore(256,' '); } } system ("clear"); // clear system while(i++ < 50) // put border cout <<"="; cout< 70)//check curve { cout << "There is no curve." << endl; } else { cout << "You need to had 5 points."<>ch; if(ch == 'y' || ch == 'Y') // want to change entry? { cin.ignore(256,' '); cout << "Enter student name"<>name; cout << "name" << name << endl; i=0; while(!name.compare(students[i]))//check student name available or not i++; i--;//for array if(i> ns) cout << "No any student found"<> assiNo; if(assiNo >= 10)//if entered more then 10 go to label { cout << "Wrong Assignment no" << endl; goto label; } cin.ignore(256,' '); cout << " Enter grade of assignment"; cin >> assiGrade; grade[i][assiNo-1] = assiGrade; cout< 70)//check for curve { cout << "There is no curve." << endl; } else { cout << "You need to had 5 points."<>ch; if(ch != 'y' || ch != 'Y') return 0; } return 0; } This code needs to be modified so that it saves my class roster to a file and can load from that file. Please help with this.

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago