Code:/* OK I want some constructive critizism on my crappy style */ #include <iostream> #include <stdlib.h> #include <conio.c> /*##################################################### GPA Average program, created by (incognito) with the help of (Smokey)for the math formulas. ###################################################*/ /* You might be wondering why I created a class that I didn't even use, well here's the answer the reason is that I made the class mostly for pratice. This also allows me to add more stuff to the program easier*/ using namespace std; double CalculaterAverage( double & x, double & y, double &l,double & p); int main() { class average { public: void SetCredits(double credit){itscredits=credit;} double GetCredits () {return itscredits;} void SetCurrentGpa(double gpa) {itsgpa=gpa;} double GetCurrentGpa() {return itsgpa;} void SetNumbersOfClasses ( double x){N_classes=x;} double GetNumberOfClasses () {return N_classes;} void SetFinalGpa(double gpa) {finalgpa=gpa;} private: double itscredits; double itsgpa; double itsNumberOfClasses; double N_classes; double finalgpa; }; textcolor(YELLOW); cout<<"Welcome to the FIGURE OUT your GPA program\n"; cout<<"by"; textcolor(LIGHTRED); cout<<" ***incognito***"<<endl<<endl; cout<<" VERSION 1.7 BETA RELEASE\n"<<endl; char name [50]; textcolor (YELLOW); cout<<"What is your name?\n"; cin.get(name,50);/*get the name of the person but this leaves the "'\n'" on the buffer, which will cause problems with the next line*/ cin.ignore(50, '\n');/*this throws out the "'\n'" character*/ double credits; textcolor(LIGHTGRAY); cout<<"\nHow many high school credits do you have,"<<endl; cout<<"without including this year?"<<endl; cin>>credits; average Student; Student.SetCredits ( credits); cout<<"\nWhat is your current GPA?"<<endl; double Gpa_response; cin>>Gpa_response; Student.SetCurrentGpa(Gpa_response); cin.ignore(325, '\n'); cout<<"\nHow many classes are you taking this year?"<<endl; cout<<"Note: These could include night school"<<endl; double NumberOfClasses; cin>>NumberOfClasses; Student.SetNumbersOfClasses(NumberOfClasses); cout<<"\nWhat do you want your final GPA to be?"<<endl; double FinalGpa; cin>>FinalGpa; Student.SetFinalGpa(FinalGpa); double FinalGpa2; FinalGpa2=CalculaterAverage(credits, Gpa_response, NumberOfClasses, FinalGpa); cout<<"\nYou'll need a "; textcolor(LIGHTRED); cout<<FinalGpa2; textcolor(LIGHTGRAY); cout<<"\nGPA average this year in order to finish with your desired GPA\n"<<endl; textcolor(LIGHTBLUE); cout<<"Note: This means that you would need an average of whatever I just\n"; cout<<"told "; cout<<"you. You would need it for the rest of your high school years, if things\n"; cout<<"keep going how they are, meaning your GPA stays the same.\n"; textcolor(LIGHTGRAY); cout<<"\nThank you "; textcolor(LIGHTCYAN); cout<<name; cout<<"."<<endl<<endl; textcolor(LIGHTGRAY); cout<<"\nI want to give special thanks to"; textcolor(LIGHTGREEN); cout<<" Smokey\n"; textcolor(LIGHTGRAY); cout<<"for helping me with the "; cout<<"math formulas."<<endl<<endl; cout<<"Neither Smokey nor Me are responsible for the accuracy of this\n"; cout<<"program.\n"<<endl; cout<<"One more thing before I decide to end this program.....\n"; textcolor(LIGHTRED); cout<<"CLASS OF '02 THE REALEST!!!!\a\a\a\a\n"<<endl; textcolor(LIGHTGRAY); system("PAUSE"); return 0; } double CalculaterAverage(double &itscredits, double &itsgpa, double &itsNumberOfClasses, double & finalgpa) { /* My friend helped with the formula on the function and it's rather complicated plus he told me not to post it......beats me why, I don't know so I didn't */ double temp1; double temp2; double temp3; double temp4; double temp5; temp1= temp2= temp3= temp4= temp5= /* itscredits=credits itsgpa=current gpa itsnumberofclasses=classes taking right now including nightschool finalgpa=finalgpa */ return temp5; }