SlideShare a Scribd company logo
//Main File (usestudentacc.cpp)
#include
#include "studentacc.h"
using namespace std;
int m_menu();
int aid_menu();
int f_aid();
int getCharge(); //Different charges for student account
const int AID = 1, BALANCE = 2, QUIT = 3;
const int SCHOLARSHIPS = 1, WORK = 2;
int main()
{
Studentacc sa;
float cash, amount;
int choice, charge, aid;
cout << "Enter the amount availible for payment: $";
cin >> cash;
sa.setBalance(cash);
cout << fixed << showpoint << setprecision(2);
//School Fees
charge = getCharge();
sa.addCharge(charge);
amount = sa.getBalance();
sa.setBalance(amount);
if(amount<0)
{
cout << "You owe $" << (-1) * amount << "this semester" << endl;
}
else
{
cout << "Your balance is $" << amount << endl;
}
choice = m_menu();
while(choice !=QUIT)
{
if(choice == AID)
{
aid = f_aid();
sa.addCharge(amount);
}
choice = m_menu();
}
}
int m_menu()
{
int choice;
bool error = false;
cout << endl;
cout << "MAIN MENU" << endl;
cout << "1 Financial Aids" << endl;
cout << "2 Balance" << endl;
cout << "3 Quit" << endl;
do{
cout << "Enter option number: ";
cin >> choice;
if((choice > 3)||(choice < 1))
{
cout << "Invaid number. Choose 1 or 2, or 3. ";
error = true;
}
else
{
error = false;
}
}while(error == true);
return choice;
}//end intmenu
int getCharge()
{
int hours, tuition, dorm_plan, meal_plan, SA_fee, Technology_fee, total_fee;
char response;
bool error;
cout << "How many credits hours are you taking this semester? (max = 21) ";
cin >> hours;
do {
if((hours>21)||(hours<0))
{
cout << " That is an invalid credit hour(s). Enter a valid credit hour ";
error = true;
}
}while(error==true);
if(hours>17&&hours>12)
{
tuition = 9828; //Package deal
cout << " Your tuition is $9,828 ";
}
else if (hours>17)
{//increment by 615 every 1 credit after 17
tuition = (hours-17)*615+9828;
cout << " Your tuition is $";
}
else
{
tuition = hours * 819; //Part-time school
cout << " Your tuition is $" << tuition << endl;
}
do{
cout << " A fixed Student Association fee is collected from each" << endl;
cout << " enrolled student for the purpose of operating, maintaining," << endl;
cout << " improving and equipping the Student Association." << endl;
cout << "The Student Association fee is $" << SA_fee << endl;
SA_fee = 110;
} while(error == true);
do{
cout << " The technology fee is $" << Technology_fee << endl;
Technology_fee = 200;
} while(error == true);
do {
cout << " Are you staying in the dorm? (yes or no)  -->";
cout << " Enter y for yes or n for no.  ";
cin >> response;
if(response=='y')
{
cout << " Dorm plan is $1,850 ";
dorm_plan = 1850;
error = false;
}
else if(response=='n')
{
cout << " You don't have a dorm plan ";
dorm_plan = 0;
error = false;
}
else
{
cout << " Invalid character, please try again ";
error = true;
}
} while(error == true);
do {
cout << " Do you have a meal plan? (y or n) -->";
cout << " Enter y for yes or n for no.  ";
cin >> response;
if(response=='y')
{
cout << " Meal plan is $1,900 ";
meal_plan = 1900;
error = false;
}
else if(response=='n')
{
cout << " You don't have a meal plan ";
meal_plan = 0;
error = false;
}
else
{
cout << " Invalid character, please try again ";
error = true;
}
} while(error == true);
total_fee = tuition + SA_fee + Technology_fee + dorm_plan + meal_plan;
cout << " Your total charge is $" << total_fee << endl;
return total_fee;
}
int f_aid()
{
int choice, hours, n_scholarship;
bool error;
float rate, work_money, scholarship_money, total, scholarship;
choice = aid_menu();
while (choice != QUIT){
if(choice == WORK){
//Scholarships
do {
cout << " How many scholarships have you earned? (Min = 0, Max = 10) ";
cin >> n_scholarship;
if((n_scholarship<0)||(n_scholarship>10))
{
cout << " Invalid number, please try again ";
error = true;
}
else
{
for(int i=1; i<=n_scholarship; i++)
{
cout << " Enter amount for scholarship #" << i << " -->";
cin >> scholarship;
scholarship_money += scholarship;
}
cout << " You have added $" << scholarship_money << " to your account";
error = false;
}
} while(error==true);
}
else
{ //Work
do {
cout << " How many hours do you work? (Max = 25) ";
cin >> hours;
if((hours<0)||(hours>25))
{
cout << " The number of hours you enter is invalid, please try again ";
error = true;
}
else
{
do {
rate = 7.25;
work_money = hours * rate * 0.8 * 16;
cout << " You will make $" << work_money << " this semester ";
error = false;
} while(error==true);
error = false;
}
} while(error == true);
}
choice = aid_menu();
}
total = work_money + scholarship_money;
return total;
}
int f_menu()
{
int choice;
bool error = false;
cout << endl;
cout << "FINANCIAL AID MENU ";
cout << "1 Scholarships" << endl;
cout << "2 Work" << endl;
cout << "3 Main Menu" << endl;
do{
cout << "Enter a number between 1 and 3: ";
cin >> choice;
if((choice > 3)||(choice < 1))
{
cout << " Invalid number, try again ";
error = true;
}
else
{
error = false;
}
}while(error == true);
return choice;
return 0;
}
Solution
//Main File (usestudentacc.cpp)
#include
#include "studentacc.h"
using namespace std;
int m_menu();
int aid_menu();
int f_aid();
int getCharge(); //Different charges for student account
const int AID = 1, BALANCE = 2, QUIT = 3;
const int SCHOLARSHIPS = 1, WORK = 2;
int main()
{
Studentacc sa;
float cash, amount;
int choice, charge, aid;
cout << "Enter the amount availible for payment: $";
cin >> cash;
sa.setBalance(cash);
cout << fixed << showpoint << setprecision(2);
//School Fees
charge = getCharge();
sa.addCharge(charge);
amount = sa.getBalance();
sa.setBalance(amount);
if(amount<0)
{
cout << "You owe $" << (-1) * amount << "this semester" << endl;
}
else
{
cout << "Your balance is $" << amount << endl;
}
choice = m_menu();
while(choice !=QUIT)
{
if(choice == AID)
{
aid = f_aid();
sa.addCharge(amount);
}
choice = m_menu();
}
}
int m_menu()
{
int choice;
bool error = false;
cout << endl;
cout << "MAIN MENU" << endl;
cout << "1 Financial Aids" << endl;
cout << "2 Balance" << endl;
cout << "3 Quit" << endl;
do{
cout << "Enter option number: ";
cin >> choice;
if((choice > 3)||(choice < 1))
{
cout << "Invaid number. Choose 1 or 2, or 3. ";
error = true;
}
else
{
error = false;
}
}while(error == true);
return choice;
}//end intmenu
int getCharge()
{
int hours, tuition, dorm_plan, meal_plan, SA_fee, Technology_fee, total_fee;
char response;
bool error;
cout << "How many credits hours are you taking this semester? (max = 21) ";
cin >> hours;
do {
if((hours>21)||(hours<0))
{
cout << " That is an invalid credit hour(s). Enter a valid credit hour ";
error = true;
}
}while(error==true);
if(hours>17&&hours>12)
{
tuition = 9828; //Package deal
cout << " Your tuition is $9,828 ";
}
else if (hours>17)
{//increment by 615 every 1 credit after 17
tuition = (hours-17)*615+9828;
cout << " Your tuition is $";
}
else
{
tuition = hours * 819; //Part-time school
cout << " Your tuition is $" << tuition << endl;
}
do{
cout << " A fixed Student Association fee is collected from each" << endl;
cout << " enrolled student for the purpose of operating, maintaining," << endl;
cout << " improving and equipping the Student Association." << endl;
cout << "The Student Association fee is $" << SA_fee << endl;
SA_fee = 110;
} while(error == true);
do{
cout << " The technology fee is $" << Technology_fee << endl;
Technology_fee = 200;
} while(error == true);
do {
cout << " Are you staying in the dorm? (yes or no)  -->";
cout << " Enter y for yes or n for no.  ";
cin >> response;
if(response=='y')
{
cout << " Dorm plan is $1,850 ";
dorm_plan = 1850;
error = false;
}
else if(response=='n')
{
cout << " You don't have a dorm plan ";
dorm_plan = 0;
error = false;
}
else
{
cout << " Invalid character, please try again ";
error = true;
}
} while(error == true);
do {
cout << " Do you have a meal plan? (y or n) -->";
cout << " Enter y for yes or n for no.  ";
cin >> response;
if(response=='y')
{
cout << " Meal plan is $1,900 ";
meal_plan = 1900;
error = false;
}
else if(response=='n')
{
cout << " You don't have a meal plan ";
meal_plan = 0;
error = false;
}
else
{
cout << " Invalid character, please try again ";
error = true;
}
} while(error == true);
total_fee = tuition + SA_fee + Technology_fee + dorm_plan + meal_plan;
cout << " Your total charge is $" << total_fee << endl;
return total_fee;
}
int f_aid()
{
int choice, hours, n_scholarship;
bool error;
float rate, work_money, scholarship_money, total, scholarship;
choice = aid_menu();
while (choice != QUIT){
if(choice == WORK){
//Scholarships
do {
cout << " How many scholarships have you earned? (Min = 0, Max = 10) ";
cin >> n_scholarship;
if((n_scholarship<0)||(n_scholarship>10))
{
cout << " Invalid number, please try again ";
error = true;
}
else
{
for(int i=1; i<=n_scholarship; i++)
{
cout << " Enter amount for scholarship #" << i << " -->";
cin >> scholarship;
scholarship_money += scholarship;
}
cout << " You have added $" << scholarship_money << " to your account";
error = false;
}
} while(error==true);
}
else
{ //Work
do {
cout << " How many hours do you work? (Max = 25) ";
cin >> hours;
if((hours<0)||(hours>25))
{
cout << " The number of hours you enter is invalid, please try again ";
error = true;
}
else
{
do {
rate = 7.25;
work_money = hours * rate * 0.8 * 16;
cout << " You will make $" << work_money << " this semester ";
error = false;
} while(error==true);
error = false;
}
} while(error == true);
}
choice = aid_menu();
}
total = work_money + scholarship_money;
return total;
}
int f_menu()
{
int choice;
bool error = false;
cout << endl;
cout << "FINANCIAL AID MENU ";
cout << "1 Scholarships" << endl;
cout << "2 Work" << endl;
cout << "3 Main Menu" << endl;
do{
cout << "Enter a number between 1 and 3: ";
cin >> choice;
if((choice > 3)||(choice < 1))
{
cout << " Invalid number, try again ";
error = true;
}
else
{
error = false;
}
}while(error == true);
return choice;
return 0;
}

More Related Content

Similar to Main File (usestudentacc.cpp)#includeiostream #include .pdf

Account.h Definition of Account class. #ifndef ACCOUNT_H #d.pdf
Account.h  Definition of Account class. #ifndef ACCOUNT_H #d.pdfAccount.h  Definition of Account class. #ifndef ACCOUNT_H #d.pdf
Account.h Definition of Account class. #ifndef ACCOUNT_H #d.pdf
anujmkt
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
rajeshjangid1865
 
Program.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdfProgram.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdf
anandshingavi23
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
brownliecarmella
 
main.cpp #include iostream #include iomanip #include fs.pdf
main.cpp #include iostream #include iomanip #include fs.pdfmain.cpp #include iostream #include iomanip #include fs.pdf
main.cpp #include iostream #include iomanip #include fs.pdf
arwholesalelors
 
PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2
eugenio pombi
 
The Art of Transduction
The Art of TransductionThe Art of Transduction
The Art of Transduction
David Stockton
 
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docxc04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
clairbycraft
 
Hey, looking to do the following with this programFill in the multip.pdf
Hey, looking to do the following with this programFill in the multip.pdfHey, looking to do the following with this programFill in the multip.pdf
Hey, looking to do the following with this programFill in the multip.pdf
rupeshmehta151
 
#include iostream #include cmath #include iomanipusing n.docx
#include iostream #include cmath #include iomanipusing n.docx#include iostream #include cmath #include iomanipusing n.docx
#include iostream #include cmath #include iomanipusing n.docx
ajoy21
 
CakePHP workshop
CakePHP workshopCakePHP workshop
CakePHP workshop
Walther Lalk
 
Data::FormValidator Simplified
Data::FormValidator SimplifiedData::FormValidator Simplified
Data::FormValidator Simplified
Fred Moyer
 
C code This program will calculate the sum of 10 positive .docx
 C code This program will calculate the sum of 10 positive .docx C code This program will calculate the sum of 10 positive .docx
C code This program will calculate the sum of 10 positive .docx
aryan532920
 
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPEBUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
VannaSchrader3
 

Similar to Main File (usestudentacc.cpp)#includeiostream #include .pdf (15)

distill
distilldistill
distill
 
Account.h Definition of Account class. #ifndef ACCOUNT_H #d.pdf
Account.h  Definition of Account class. #ifndef ACCOUNT_H #d.pdfAccount.h  Definition of Account class. #ifndef ACCOUNT_H #d.pdf
Account.h Definition of Account class. #ifndef ACCOUNT_H #d.pdf
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
 
Program.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdfProgram.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdf
 
Classes(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docxClasses(or Libraries)#include #include #include #include.docx
Classes(or Libraries)#include #include #include #include.docx
 
main.cpp #include iostream #include iomanip #include fs.pdf
main.cpp #include iostream #include iomanip #include fs.pdfmain.cpp #include iostream #include iomanip #include fs.pdf
main.cpp #include iostream #include iomanip #include fs.pdf
 
PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2
 
The Art of Transduction
The Art of TransductionThe Art of Transduction
The Art of Transduction
 
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docxc04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
c04.DS_Storec04comparison-operator.htmlBullseyec04com.docx
 
Hey, looking to do the following with this programFill in the multip.pdf
Hey, looking to do the following with this programFill in the multip.pdfHey, looking to do the following with this programFill in the multip.pdf
Hey, looking to do the following with this programFill in the multip.pdf
 
#include iostream #include cmath #include iomanipusing n.docx
#include iostream #include cmath #include iomanipusing n.docx#include iostream #include cmath #include iomanipusing n.docx
#include iostream #include cmath #include iomanipusing n.docx
 
CakePHP workshop
CakePHP workshopCakePHP workshop
CakePHP workshop
 
Data::FormValidator Simplified
Data::FormValidator SimplifiedData::FormValidator Simplified
Data::FormValidator Simplified
 
C code This program will calculate the sum of 10 positive .docx
 C code This program will calculate the sum of 10 positive .docx C code This program will calculate the sum of 10 positive .docx
C code This program will calculate the sum of 10 positive .docx
 
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPEBUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
BUS 225 Air Transporstation SupEMPLOYEE IDDATE OF HIREDEPARTMENTPE
 

More from arasanmobiles

a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdfa) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
arasanmobiles
 
1. The evolution of transportation has generally led to changes in u.pdf
1. The evolution of transportation has generally led to changes in u.pdf1. The evolution of transportation has generally led to changes in u.pdf
1. The evolution of transportation has generally led to changes in u.pdf
arasanmobiles
 
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
arasanmobiles
 
1) Name four properties of an OpenFileDialog that we often set prior.pdf
1) Name four properties of an OpenFileDialog that we often set prior.pdf1) Name four properties of an OpenFileDialog that we often set prior.pdf
1) Name four properties of an OpenFileDialog that we often set prior.pdf
arasanmobiles
 
Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
  Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf  Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
arasanmobiles
 
DBA Company Income Statement For the period ended December 31,.pdf
    DBA Company   Income Statement   For the period ended December 31,.pdf    DBA Company   Income Statement   For the period ended December 31,.pdf
DBA Company Income Statement For the period ended December 31,.pdf
arasanmobiles
 
Indicate whether the solute solid is generally so.pdf
                     Indicate whether the solute solid is generally so.pdf                     Indicate whether the solute solid is generally so.pdf
Indicate whether the solute solid is generally so.pdf
arasanmobiles
 
in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
                     in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf                     in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
arasanmobiles
 
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdfPhenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
arasanmobiles
 
B. When dissolved solute and undissolved solute e.pdf
                     B. When dissolved solute and undissolved solute e.pdf                     B. When dissolved solute and undissolved solute e.pdf
B. When dissolved solute and undissolved solute e.pdf
arasanmobiles
 
Yes both men and women differ in their thinking, research has proved.pdf
Yes both men and women differ in their thinking, research has proved.pdfYes both men and women differ in their thinking, research has proved.pdf
Yes both men and women differ in their thinking, research has proved.pdf
arasanmobiles
 
What is the probability that a five-card poker hand contains the a.pdf
What is the probability that a five-card poker hand contains the a.pdfWhat is the probability that a five-card poker hand contains the a.pdf
What is the probability that a five-card poker hand contains the a.pdf
arasanmobiles
 
When using some Sounds and Audio Devices functions you see a message.pdf
When using some Sounds and Audio Devices functions you see a message.pdfWhen using some Sounds and Audio Devices functions you see a message.pdf
When using some Sounds and Audio Devices functions you see a message.pdf
arasanmobiles
 
We can better understand it with the help of examples.Red flower -.pdf
We can better understand it with the help of examples.Red flower -.pdfWe can better understand it with the help of examples.Red flower -.pdf
We can better understand it with the help of examples.Red flower -.pdf
arasanmobiles
 
The racial and ethnic makeup of the American people is in flux. New .pdf
The racial and ethnic makeup of the American people is in flux. New .pdfThe racial and ethnic makeup of the American people is in flux. New .pdf
The racial and ethnic makeup of the American people is in flux. New .pdf
arasanmobiles
 
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdfThe ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
arasanmobiles
 
The causal relationship in epidemiology is generally an observation .pdf
The causal relationship in epidemiology is generally an observation .pdfThe causal relationship in epidemiology is generally an observation .pdf
The causal relationship in epidemiology is generally an observation .pdf
arasanmobiles
 
Since Lithium sulfate is an ionic compound and is soluble in water, .pdf
Since Lithium sulfate is an ionic compound and is soluble in water, .pdfSince Lithium sulfate is an ionic compound and is soluble in water, .pdf
Since Lithium sulfate is an ionic compound and is soluble in water, .pdf
arasanmobiles
 
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdfoperating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
arasanmobiles
 
Microbiology is the study of microscopic organisms such as virus, ba.pdf
Microbiology is the study of microscopic organisms such as virus, ba.pdfMicrobiology is the study of microscopic organisms such as virus, ba.pdf
Microbiology is the study of microscopic organisms such as virus, ba.pdf
arasanmobiles
 

More from arasanmobiles (20)

a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdfa) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
a) Here, H2PO4- Acts as acid and HPO42- as salt.In equation pKa of.pdf
 
1. The evolution of transportation has generally led to changes in u.pdf
1. The evolution of transportation has generally led to changes in u.pdf1. The evolution of transportation has generally led to changes in u.pdf
1. The evolution of transportation has generally led to changes in u.pdf
 
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
1) Transition state 2) Threshold energy 3) Catalysts or Intermed.pdf
 
1) Name four properties of an OpenFileDialog that we often set prior.pdf
1) Name four properties of an OpenFileDialog that we often set prior.pdf1) Name four properties of an OpenFileDialog that we often set prior.pdf
1) Name four properties of an OpenFileDialog that we often set prior.pdf
 
Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
  Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf  Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
Ecell = Eocell - (0.0592n)log (more dilute solnmore concd soln). .pdf
 
DBA Company Income Statement For the period ended December 31,.pdf
    DBA Company   Income Statement   For the period ended December 31,.pdf    DBA Company   Income Statement   For the period ended December 31,.pdf
DBA Company Income Statement For the period ended December 31,.pdf
 
Indicate whether the solute solid is generally so.pdf
                     Indicate whether the solute solid is generally so.pdf                     Indicate whether the solute solid is generally so.pdf
Indicate whether the solute solid is generally so.pdf
 
in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
                     in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf                     in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
in HCl [H+] concentration = 0.12M pH of HCl = -lo.pdf
 
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdfPhenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
Phenanthrene is a polycyclic aromatic hydrocarbon composed of three .pdf
 
B. When dissolved solute and undissolved solute e.pdf
                     B. When dissolved solute and undissolved solute e.pdf                     B. When dissolved solute and undissolved solute e.pdf
B. When dissolved solute and undissolved solute e.pdf
 
Yes both men and women differ in their thinking, research has proved.pdf
Yes both men and women differ in their thinking, research has proved.pdfYes both men and women differ in their thinking, research has proved.pdf
Yes both men and women differ in their thinking, research has proved.pdf
 
What is the probability that a five-card poker hand contains the a.pdf
What is the probability that a five-card poker hand contains the a.pdfWhat is the probability that a five-card poker hand contains the a.pdf
What is the probability that a five-card poker hand contains the a.pdf
 
When using some Sounds and Audio Devices functions you see a message.pdf
When using some Sounds and Audio Devices functions you see a message.pdfWhen using some Sounds and Audio Devices functions you see a message.pdf
When using some Sounds and Audio Devices functions you see a message.pdf
 
We can better understand it with the help of examples.Red flower -.pdf
We can better understand it with the help of examples.Red flower -.pdfWe can better understand it with the help of examples.Red flower -.pdf
We can better understand it with the help of examples.Red flower -.pdf
 
The racial and ethnic makeup of the American people is in flux. New .pdf
The racial and ethnic makeup of the American people is in flux. New .pdfThe racial and ethnic makeup of the American people is in flux. New .pdf
The racial and ethnic makeup of the American people is in flux. New .pdf
 
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdfThe ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
The ion responsible is HCO3-.HCO3- is the conjugate base of the we.pdf
 
The causal relationship in epidemiology is generally an observation .pdf
The causal relationship in epidemiology is generally an observation .pdfThe causal relationship in epidemiology is generally an observation .pdf
The causal relationship in epidemiology is generally an observation .pdf
 
Since Lithium sulfate is an ionic compound and is soluble in water, .pdf
Since Lithium sulfate is an ionic compound and is soluble in water, .pdfSince Lithium sulfate is an ionic compound and is soluble in water, .pdf
Since Lithium sulfate is an ionic compound and is soluble in water, .pdf
 
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdfoperating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
 
Microbiology is the study of microscopic organisms such as virus, ba.pdf
Microbiology is the study of microscopic organisms such as virus, ba.pdfMicrobiology is the study of microscopic organisms such as virus, ba.pdf
Microbiology is the study of microscopic organisms such as virus, ba.pdf
 

Recently uploaded

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 

Recently uploaded (20)

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 

Main File (usestudentacc.cpp)#includeiostream #include .pdf

  • 1. //Main File (usestudentacc.cpp) #include #include "studentacc.h" using namespace std; int m_menu(); int aid_menu(); int f_aid(); int getCharge(); //Different charges for student account const int AID = 1, BALANCE = 2, QUIT = 3; const int SCHOLARSHIPS = 1, WORK = 2; int main() { Studentacc sa; float cash, amount; int choice, charge, aid; cout << "Enter the amount availible for payment: $"; cin >> cash; sa.setBalance(cash); cout << fixed << showpoint << setprecision(2); //School Fees charge = getCharge(); sa.addCharge(charge); amount = sa.getBalance(); sa.setBalance(amount); if(amount<0) { cout << "You owe $" << (-1) * amount << "this semester" << endl; } else { cout << "Your balance is $" << amount << endl; } choice = m_menu();
  • 2. while(choice !=QUIT) { if(choice == AID) { aid = f_aid(); sa.addCharge(amount); } choice = m_menu(); } } int m_menu() { int choice; bool error = false; cout << endl; cout << "MAIN MENU" << endl; cout << "1 Financial Aids" << endl; cout << "2 Balance" << endl; cout << "3 Quit" << endl; do{ cout << "Enter option number: "; cin >> choice; if((choice > 3)||(choice < 1)) { cout << "Invaid number. Choose 1 or 2, or 3. "; error = true; } else { error = false; } }while(error == true); return choice; }//end intmenu int getCharge() {
  • 3. int hours, tuition, dorm_plan, meal_plan, SA_fee, Technology_fee, total_fee; char response; bool error; cout << "How many credits hours are you taking this semester? (max = 21) "; cin >> hours; do { if((hours>21)||(hours<0)) { cout << " That is an invalid credit hour(s). Enter a valid credit hour "; error = true; } }while(error==true); if(hours>17&&hours>12) { tuition = 9828; //Package deal cout << " Your tuition is $9,828 "; } else if (hours>17) {//increment by 615 every 1 credit after 17 tuition = (hours-17)*615+9828; cout << " Your tuition is $"; } else { tuition = hours * 819; //Part-time school cout << " Your tuition is $" << tuition << endl; } do{ cout << " A fixed Student Association fee is collected from each" << endl; cout << " enrolled student for the purpose of operating, maintaining," << endl; cout << " improving and equipping the Student Association." << endl; cout << "The Student Association fee is $" << SA_fee << endl; SA_fee = 110; } while(error == true); do{
  • 4. cout << " The technology fee is $" << Technology_fee << endl; Technology_fee = 200; } while(error == true); do { cout << " Are you staying in the dorm? (yes or no) -->"; cout << " Enter y for yes or n for no. "; cin >> response; if(response=='y') { cout << " Dorm plan is $1,850 "; dorm_plan = 1850; error = false; } else if(response=='n') { cout << " You don't have a dorm plan "; dorm_plan = 0; error = false; } else { cout << " Invalid character, please try again "; error = true; } } while(error == true); do { cout << " Do you have a meal plan? (y or n) -->"; cout << " Enter y for yes or n for no. "; cin >> response; if(response=='y') { cout << " Meal plan is $1,900 "; meal_plan = 1900; error = false; } else if(response=='n')
  • 5. { cout << " You don't have a meal plan "; meal_plan = 0; error = false; } else { cout << " Invalid character, please try again "; error = true; } } while(error == true); total_fee = tuition + SA_fee + Technology_fee + dorm_plan + meal_plan; cout << " Your total charge is $" << total_fee << endl; return total_fee; } int f_aid() { int choice, hours, n_scholarship; bool error; float rate, work_money, scholarship_money, total, scholarship; choice = aid_menu(); while (choice != QUIT){ if(choice == WORK){ //Scholarships do { cout << " How many scholarships have you earned? (Min = 0, Max = 10) "; cin >> n_scholarship; if((n_scholarship<0)||(n_scholarship>10)) { cout << " Invalid number, please try again "; error = true; } else { for(int i=1; i<=n_scholarship; i++) {
  • 6. cout << " Enter amount for scholarship #" << i << " -->"; cin >> scholarship; scholarship_money += scholarship; } cout << " You have added $" << scholarship_money << " to your account"; error = false; } } while(error==true); } else { //Work do { cout << " How many hours do you work? (Max = 25) "; cin >> hours; if((hours<0)||(hours>25)) { cout << " The number of hours you enter is invalid, please try again "; error = true; } else { do { rate = 7.25; work_money = hours * rate * 0.8 * 16; cout << " You will make $" << work_money << " this semester "; error = false; } while(error==true); error = false; } } while(error == true); } choice = aid_menu(); } total = work_money + scholarship_money; return total;
  • 7. } int f_menu() { int choice; bool error = false; cout << endl; cout << "FINANCIAL AID MENU "; cout << "1 Scholarships" << endl; cout << "2 Work" << endl; cout << "3 Main Menu" << endl; do{ cout << "Enter a number between 1 and 3: "; cin >> choice; if((choice > 3)||(choice < 1)) { cout << " Invalid number, try again "; error = true; } else { error = false; } }while(error == true); return choice; return 0; } Solution //Main File (usestudentacc.cpp) #include #include "studentacc.h" using namespace std; int m_menu();
  • 8. int aid_menu(); int f_aid(); int getCharge(); //Different charges for student account const int AID = 1, BALANCE = 2, QUIT = 3; const int SCHOLARSHIPS = 1, WORK = 2; int main() { Studentacc sa; float cash, amount; int choice, charge, aid; cout << "Enter the amount availible for payment: $"; cin >> cash; sa.setBalance(cash); cout << fixed << showpoint << setprecision(2); //School Fees charge = getCharge(); sa.addCharge(charge); amount = sa.getBalance(); sa.setBalance(amount); if(amount<0) { cout << "You owe $" << (-1) * amount << "this semester" << endl; } else { cout << "Your balance is $" << amount << endl; } choice = m_menu(); while(choice !=QUIT) { if(choice == AID) { aid = f_aid(); sa.addCharge(amount); }
  • 9. choice = m_menu(); } } int m_menu() { int choice; bool error = false; cout << endl; cout << "MAIN MENU" << endl; cout << "1 Financial Aids" << endl; cout << "2 Balance" << endl; cout << "3 Quit" << endl; do{ cout << "Enter option number: "; cin >> choice; if((choice > 3)||(choice < 1)) { cout << "Invaid number. Choose 1 or 2, or 3. "; error = true; } else { error = false; } }while(error == true); return choice; }//end intmenu int getCharge() { int hours, tuition, dorm_plan, meal_plan, SA_fee, Technology_fee, total_fee; char response; bool error; cout << "How many credits hours are you taking this semester? (max = 21) "; cin >> hours; do { if((hours>21)||(hours<0))
  • 10. { cout << " That is an invalid credit hour(s). Enter a valid credit hour "; error = true; } }while(error==true); if(hours>17&&hours>12) { tuition = 9828; //Package deal cout << " Your tuition is $9,828 "; } else if (hours>17) {//increment by 615 every 1 credit after 17 tuition = (hours-17)*615+9828; cout << " Your tuition is $"; } else { tuition = hours * 819; //Part-time school cout << " Your tuition is $" << tuition << endl; } do{ cout << " A fixed Student Association fee is collected from each" << endl; cout << " enrolled student for the purpose of operating, maintaining," << endl; cout << " improving and equipping the Student Association." << endl; cout << "The Student Association fee is $" << SA_fee << endl; SA_fee = 110; } while(error == true); do{ cout << " The technology fee is $" << Technology_fee << endl; Technology_fee = 200; } while(error == true); do { cout << " Are you staying in the dorm? (yes or no) -->"; cout << " Enter y for yes or n for no. "; cin >> response;
  • 11. if(response=='y') { cout << " Dorm plan is $1,850 "; dorm_plan = 1850; error = false; } else if(response=='n') { cout << " You don't have a dorm plan "; dorm_plan = 0; error = false; } else { cout << " Invalid character, please try again "; error = true; } } while(error == true); do { cout << " Do you have a meal plan? (y or n) -->"; cout << " Enter y for yes or n for no. "; cin >> response; if(response=='y') { cout << " Meal plan is $1,900 "; meal_plan = 1900; error = false; } else if(response=='n') { cout << " You don't have a meal plan "; meal_plan = 0; error = false; } else {
  • 12. cout << " Invalid character, please try again "; error = true; } } while(error == true); total_fee = tuition + SA_fee + Technology_fee + dorm_plan + meal_plan; cout << " Your total charge is $" << total_fee << endl; return total_fee; } int f_aid() { int choice, hours, n_scholarship; bool error; float rate, work_money, scholarship_money, total, scholarship; choice = aid_menu(); while (choice != QUIT){ if(choice == WORK){ //Scholarships do { cout << " How many scholarships have you earned? (Min = 0, Max = 10) "; cin >> n_scholarship; if((n_scholarship<0)||(n_scholarship>10)) { cout << " Invalid number, please try again "; error = true; } else { for(int i=1; i<=n_scholarship; i++) { cout << " Enter amount for scholarship #" << i << " -->"; cin >> scholarship; scholarship_money += scholarship; } cout << " You have added $" << scholarship_money << " to your account"; error = false; }
  • 13. } while(error==true); } else { //Work do { cout << " How many hours do you work? (Max = 25) "; cin >> hours; if((hours<0)||(hours>25)) { cout << " The number of hours you enter is invalid, please try again "; error = true; } else { do { rate = 7.25; work_money = hours * rate * 0.8 * 16; cout << " You will make $" << work_money << " this semester "; error = false; } while(error==true); error = false; } } while(error == true); } choice = aid_menu(); } total = work_money + scholarship_money; return total; } int f_menu() { int choice; bool error = false; cout << endl; cout << "FINANCIAL AID MENU ";
  • 14. cout << "1 Scholarships" << endl; cout << "2 Work" << endl; cout << "3 Main Menu" << endl; do{ cout << "Enter a number between 1 and 3: "; cin >> choice; if((choice > 3)||(choice < 1)) { cout << " Invalid number, try again "; error = true; } else { error = false; } }while(error == true); return choice; return 0; }