1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
void NotifyAcceptedApplicant
(char school, double gpa, int mathSAT, int verbalSAT, char alumnus, int &count)
{
if(school == 'L')
cout << "A liberal art applicant accepted!" << endl;
else
cout << "A music applicant accepted!" << endl;
cout << "#" << ++count << ". School:" << school << '\t' << "GPA:" << setprecision (1) << fixed << gpa << '\t' << "Math:" << mathSAT << '\t' << "Verbal:" << verbalSAT << '\t' << "Alumnus:" << alumnus << '\n\n'; return;
}
void NotifyRejectedApplicant
(char school, double gpa, int mathSAT, int verbalSAT, char alumnus, int &count)
{
if(school == 'L')
cout << "A liberal art applicant rejected." << endl;
else
cout << "A music applicant rejected." << endl;
cout << "+ School: " << school << '\t' << "GPA:" << setprecision (1) << fixed << gpa << '\t' << "Math:" << mathSAT << '\t' << "Verbal:" << verbalSAT << '\t' << "Alumnus:" << alumnus << '\n\n'; return;
}
void LiberalArtAccepting(char school, double gpa, int mathSAT, int verbalSAT, char alumnus, int &count)
{
if(count > 5) return NotifyRejectedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
int combineSAT = mathSAT + verbalSAT;
if(alumnus == 'Y')
{
if(gpa >= 3.0 && combinedSAT >= 1000) return NotifyAcceptedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
}
else
{
if(gpa >= 3.5 && combinedSAT >= 1200) return NotifyAcceptedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
}
return NotifyRejectedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
}
void MusicAcepting(char, school, double gpa, int mathSAT, int verbalSAT, char alumnus, int &count)
{
if(count > 3) return NotifyRejectedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
if(mathSAT >= 500 && verbalSAT >= 500) return NotifyAcceptedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
return NotifyRejectedApplicant(school, gpa, mathSAT, verbalSAT, alumnus);
}
|