Ok, I am really stuck, and need major help. Ths assignment i am working on is as follows:
Its american idol. Design a function getJudgeData that asks the user for a judge's score, stores it in a reference parameter variable, and validates it. This function should be called by your function main() once for each of the 5 judges.
I have my class built i am just working on the main.cpp file...
I would REALLY appiciated ANY help. I am having trouble passing it by reference by using the Class Stat. I cant get the getJudgeData to put the data and store it into the class. Does anybody have ANY suggestions PLEASE? I can post the class if you need to see it I want to take the s.getNum(); and store the scores into there.
Code:#include <iostream> #include "Stat.h" using namespace std; void getJudgeData(int &); double calcScore(); int main() { int score1 = 0, score2 = 0, score3=0, score4=0, score5=0; Stat s; cout << "This program assignment number 4 was created by Jeremy Rice" << endl; cout<< "The Next American Idol!!!"<<endl; cout<< "Please enter your scores below!"<<endl; cout<<"Judge #1 what is your score"<<endl; getJudgeData(score1); cout<<"Judge #2 what is your score"<<endl; getJudgeData(score2); cout<<"Judge #3 what is your score"<<endl; getJudgeData(score3); cout<<"Judge #4 what is your score"<<endl; getJudgeData(score4); cout<<"Judge #5 what is your score"<<endl; getJudgeData(score5); system("pause"); return 0; } void getJudgeData(int &score) { Stat s; s.getNum(""); } // The average is the min and max subtracted // the remaining three numbers are calculated for average /*double calcScore() { Stat s; int average = 0; average(s.getSum - s.getMin - s.getMax)/3; } */