#include<iostream>
#include<string>
using namespace std;
class Teacher;
class score{
public:
score(doublec=0,double e=0,double m=0);
voidshow();
private:
doublecomputer;
doubleenglish;
doublemath;
};
score::score(double c,double e,double m)
{computer=c;
english=e;
math=m;
}
void score::show()
{cout<<"score computer:"<<computer<<endl;
cout<<"score english:"<<english<<endl;
cout<<"score math:"<<math<<endl;
}
class student{
public:
student(stringname1,string num1,double s1,double s2,double s3);
void show(Teacher&);
private:
string name;
string num;
score score1;
};
student::student(string name1,string num1,double s1,double s2,double s3)
:score(s1,s2,s3)
{name=name1;
num=num1;
}
void student::show(Teacher&T)
{cout<<"Name:"<<name<<endl;
score.show();
}
class Teacher{
public:
Teacher(string name1,string num1)
{name=name1;
num=mun1;
}
friendstudent;
void show();
private:
stringname;
stringnum;
}
int main()
(
TeacherTeach1("Mr.chen","0001");
Teach1.show();
student stu1("Linmin","00012",98,96,93);
stu1.show(Teach1);
studentstu2("Liming","00013",93,87,85);
stu2.show(Teach1);
return 0;