//Declaration of the functions
//int Job_Estimator();
int Help();
int Undercoat(int TotalCost);
int MenuOption = 0;
char Name[30];
char Date[12];
int Area = 0;
int main()
{ //output of the menu option
int MenuOption = 0;
cout << "\n Welcom To Job Estimator Choose One Option\n";
cout << "\n =============Main Menu===============\n";
cout << "\n 1-Help\n";
cout << "\n 2-Job Estimator\n";
cout << "\n 3-Exit\n";
cout << "\n =======================================\n";
cout << "\n please enter option 1,2 or 3 to Exit\n";
cin >> MenuOption;
//decision making if else with a switch
if (MenuOption == 3)
{
cout <<"\n\n Thanks For Using The Job Estimator Excellent \n\n";
exit(0);
}
else
{
//els if the 3 is not the option then use switch for the two other options
switch (MenuOption)
{
case 1: Help();
break;
case 2: Job_Estimator();
break;
default: cout << "\n\n Wrong Option Try Again\n\n ";
break;
}
}
return 0;
}
//implementation of the declared functions
int Job_Estimator() {
//elements inside the job estimator function
//discretion of data types
int Height = 0;
int Length1 = 0;
int length2 = 0;
int Quality = 0;
int TotalCost = 0;
//titile foe the JobEstimatoer paint Job
cout << "\n\n You Have Chosen To Start Job Estimatoer Paint Job For Four Walls\n\n";
//outputs and inputs for the 2 option the job estimator
cout << "\n\n Enter Name \n\n";
cin >> Name; //entry name and date input and output
cout << "\n\n Enter Date \n\n";
cin >> Date;
//entry gor the haight
cout << "\n\n Enter height of the room (between 2 and 6 metres)\n\n";
cin >> Height;
//entry for the length
cout << "\n\n Enter first 2 length of parralel walls (minimum 1 metre and maximum 25 metres) \n\n";
cin >> Length1;
cout << "\n\n Enter secound 2 length of parralel walls (minimum 1 metre and maximum 25 metres\n\n) ";
cin >> length2;
//calculation off all the walls(Automatically calculation of area of the room)
Area = (Height * Length1) * 2 + (Height * length2) * 2;
cout << "\n\n The Total Aera Of The Room is=";
cout << Area;
//output of the paint qulity
cout << "\n\n Please Chose The Qulity Of The Paint";
cout << "\n\n 1-Luxury quality which cost" << char(156) << 2.75 << "per metre squared\n";
cout << "\n\n 2-Standard quality which costs" << char(156) << 2.00 << " per square metre\n";
cout << "\n\n 3-Economy quality which costs " << char(156) << 0.55 <<" per square metre\n\n";
//switch desistion making menu input
cin >> Quality;
while (Quality < 1 || Quality>3 || cin.fail()) {
cout << "Please Enter Correct optins (between 1 and 3)\n";
cin.clear();
cin >> Quality;
}
int Help(){
//elemtns for help function
cout << "\n\n You Have Chosen Help\n";
cout << "\n\n You Need To Chose Number 2 To Start Job_Estimator\n";
cout << "\n\n You Need To Chose Number 3 To Exit The Job_Estimator Programe\n\n";
return 0;
}
//this is the undercout funcation that will allow the use to chose if they want undercoat
//this will also output the all the total
int Undercoat(int TotalCost)
{
char sundercoat = ' ';
int Tins;
float TotalCostpaint = TotalCost;
//out question to see if they want undercoat or not
cout << "\n\n Do You Want Undercoat Y/N \n\n"ยท
cin >> sundercoat;
//if stamtement funcstion to make a dicition
if (sundercoat == 'Y' || sundercoat == 'y')
{
cout << "\n\n How Many Tins\n";
cin >> Tins;
TotalCostpaint = TotalCostpaint + Tins * 8.99;
cout << "\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n";
cout << "\n\n""Name: " << Name << "\n\n";
cout << "Date: " << Date << "\n\n";
cout << "Area: " << Area << "\n\n";
cout << "Cost: " << TotalCostpaint << "\n\n";
cout << "Undercoat: " << Tins << "\n\n";
cout << "\n=================================================================== \n";
cout << "\n\n Your Total Cost Is:" << char(156) << TotaICostpaint << "\n\n";
cout << "\n======================================================== \n";
}
else
{
cout << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + \n";
cout << "\n\n""Name: " << Name << "\n\n";
cout << "Date: " << Date << "\n\n";
cout << "Area: " << Area << "\n\n";
cout << "Cost: " << TotalCostpaint << "\n\n";
cout << "\n==================================================================\n ";
cout << "\n\nYour Total Cost Is:" << char(156) << TotalCostpaint << "\n\n";
cout << "\n=========================================================================================\n";
}
return 0;
//}