Question: #include #include #include #include #include using namespace std; class Student { private: string fname; string lname; int test 1 ; int test 2 ; int
#include
#include
#include
#include
#include
using namespace std;
class Student
private:
string fname;
string lname;
int test;
int test;
int assignment assignment assignment assignment;
int attendance;
int inputValidateint;
void getScoreint &;
void calcAverageint a int a int a int a;
int ifLowestint a int a int a int a;
int findLowestint a int a int a int a;
int average;
public:
Student;
Studentstring f string l int t int t int a int a int a int a int attn;
~Student;
char getGrade;
bool isPassed;
float getAvg;
void print;
int testScore
return test test;
int assignmentScore
return assignment assignment assignment assignment;
;
void Student::print
cout setw fname setw lname setw testScore setw assignmentScore setw getAvg setw getGrade setwisPassed "passed" : "failed" endl;
float Student::getAvg
return test testassignment assignment assignment assignment;
bool Student::isPassed
if attendance
return false;
if getAvg
return false;
return true;
char Student::getGrade
float average getAvg;
if average
return A;
else if average && average
return B;
else if average && average
return C;
else if average && average
return D;
else
return F;
Student::Student
Student::Studentstring fn string ln int t int t int a int a int a int a int atten
fname fn;
lname ln;
test t;
test t;
assignment a;
assignment a;
assignment a;
assignment a;
attendance atten;
Student::~Student
int main
ifstream ifile;
ifile.openMy grades.txt;
string line;
int count ;
while getlineifile line
count;
ifile.close;
ifile.openMy grades.txt;
vector students;
if ifileisopen
string fname, lname;
int test test assign assign assign assign atten;
for int i ; i count; i
ifile fname lname test test assign assign assign assign atten;
students.pushbackStudentfname lname test test assign assign assign assign atten;
else
cout "File not opened!" endl;
return ;
for auto student : students
student.print;
ifile.close;
void calcAverage,
int a
a
a
a;
getScorea;
getScorea;
getScorea;
getScorea;
calcAveragea a a a;
return ;
int inputValidateint a
whilecin aa a
cout "Error. An integer from must be entered: ;
cin.clear;
return num;
void getScoreint &a
cout "What is the testscore: ;
a inputValidatea;
int lowest;
int average;
void calcAverageint a
int a
int a
int a
int findLowest;
int average;
lowest findLowesta a a a;
if a lowest
average a a a;
else if a lowest
average a a a;
else if a lowest
average a a a;
else if a lowest
average a a a;
cout "The average is: average endl;
int ifLowest int a
int a
int a
int a
int lowest;
if a a
if a a
if a a
lowest a;
return lowest;
int findLowestint a
int a
int a
int a
int smallest;
smallest ifLowesta a a a;
smallest ifLowesta a a a;
smallest ifLowesta a a a;
smallest ifLowesta a a a;
smallest ifLowesta a a a;
return smallest;
return ;
THE programm wont run having problems with the error codes and need to remove or change the class private public and not use gobleal variuables
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
