Hi guys im getting some errors here and cant seem to find why?
#include <iostream>
#include <iomanip>
using namespace std;
class Student{
public:
Student (Mary, 100, 99, 88, 1);
void getInfo();
void showInfo();
private:
string name;
double test1, test2, test3;
int idNum;
};
Student::Student (string n, double t1, double t2, double t3, int i)
{
name = n;
test1 = t1;
test2 = t2;
test3 = t3;
idNum = i;
}
Student::getInfo(){
cout<<"Enter name, three tests grades and ID ";
cin>>name>>test1>>test2>>test3>>idNum;
}
Student::showInfo(){
cout<<fixed<<setprecision(2)<<name<<"\t\t\t"<<idNum<<"\t\t\t"<<test1<<"\t\t\t"<<test2<<"\t\t\t"<<test3<<"\t\t\t" <<(test1*test2*test3)/3<<endl;
}
int main()
{
Student s1, s2, s3;
s2.getInfo();
s3.getInfo();
s1.showInfo();
s2.showInfo();
s3.showInfo();
return 0;
}