SIMS: : SIMS ()
{//constructor.
The head=new (Class);
Strcpy (head - & gt; The ClassName, "");
head-> next=NULL;
head-> Studentcount=0;
Stu=head - & gt; Student=new (student);
Strcpy (stu - & gt; The name, "");
Strcpy (stu - & gt; Number, "");
Stu - & gt; next=NULL;
The term=stu - & gt; The term=new (term);
Term - & gt; The term=0;
Term - & gt; next=NULL;
Term - & gt; Achievement. The English=0;
Term - & gt; Achievement. The Physics=0;
Term - & gt; Achievement.Com puter=0;
Term - & gt; Achievement. The total=0;
Term - & gt; Achievement. Business=0;
Classcount=0;
};
SIMS: : ~ SIMS ()
{//destructors.
Class * c;
Student * s;
The Term * t;
C=head;
While (c)
{
S=stu=head - & gt; Student;
While (s)
{
T=term=stu - & gt; The term;
While (t)
{
The term=term - & gt; next;
Delete (t);
T=term;
}
Stu=stu - & gt; next;
Delete (s);
S=stu;
}
The head=head - & gt; next;
Delete (c);
C=head;
}
}
Void SIMS: : the Main ()
{//main window function.
Int choice=1;
While (choice!=0)
{
Cout<" "& lt;
Cin> Choice;
The switch (choice)
{
Case 0:
break;
Case 1:
Insert ();
break;
Case 2:
The Modify ();
break;
Case 3:
Sort ();
break;
Case 4:
SearchAchievement ();
break;
Case 5:
ShowNamelist ();
break;
Case 6:
ShowAchievement ();
break;
Case 7: deletestu (); break;
Default:
Choice=1;
break;
}//switch
}//while
}//the Main
Void SIMS: : Insert ()
{//insert a student a semester grades
Char n [20].//the student name
Char num [20].//the student student id
Char cn [50];//the student class
Int te;//which semester grades to insert the student
Int English;//the student English
Int physics;//the student physical result
Int computer;//the student computer grade
Cout<" Please input the student's name: ";
Cin> n;
Cout<" Please input the student student id: ";
Cin> Num.
Cout<" Please input the student in the class: ";
Cin> cn;
Cout<" Please input which semester: ";
Cin> Te;
Cout<" Please input the student English: ";
Cin> English;
Cout<" Please input the student physical performance: ";
Cin> physics;
Cout<" Please enter the student computer grade: ";
Cin> Computer;
Class * c=head;
Student * s=NULL;
The Term * t=NULL;
While (c - & gt; Next& & STRCMP (c - & gt; The ClassName, cn))
{
C=c - & gt; next;
}
If (STRCMP (c - & gt; The ClassName, cn))
{
C - & gt; Next=new (Class);
Classcount++;
C=c - & gt; next;
C - & gt; Studentcount=0;
Strcpy (c - & gt; The ClassName, cn);
C - & gt; next=NULL;
C - & gt; Student=new (student);
S=c - & gt; Student;
Strcpy (s - & gt; The name, "");
Strcpy (s - & gt; Number, "");
S - & gt; next=NULL;
S - & gt; The term=new (term);
T=s - & gt; The term;
T - & gt; The term=0;
T - & gt; next=NULL;
T - & gt; Achievement. The English=0;
T - & gt; Achievement.Com puter=0;
T - & gt; Achievement. The Physics=0;
T - & gt; Achievement. The total=0;
T - & gt; Achievement. Business=0;
}
S=c - & gt; Student;
While (s - & gt; Next& & STRCMP (s - & gt; The name, n) & amp; & STRCMP (s - & gt; Number, num))
{
S=s - & gt; next;
}
If (STRCMP (s - & gt; The name, n) & amp; & STRCMP (s - & gt; Number, num))
{
S - & gt; Next=new (Student);
+ + (c - & gt; Studentcount);
S=s - & gt; next;
Strcpy (s - & gt; The name, n);
Strcpy (s - & gt; Number, num);
S - & gt; next=NULL;
S - & gt; The term=new (term);
T=s - & gt; The term;
T - & gt; The term=0;
T - & gt; next=NULL;
T - & gt; Achievement. The English=0;
T - & gt; Achievement.Com puter=0;
T - & gt; Achievement. The Physics=0;
T - & gt; Achievement. The total=0;
T - & gt; Achievement. Business=0;
}
T=s - & gt; The term;
While (t - & gt; Next& & T - & gt; The term!=te)
{
T=t - & gt; next;
}
If (t - & gt; The term!=te)
{
T - & gt; Next=new (Term);
T=t - & gt; next;
T - & gt; The term=te;
T - & gt; next=NULL;
T - & gt; Achievement.=English. English;
T - & gt; Achievement.Com puter=computer;
T - & gt; Achievement. Physics=Physics;
T - & gt; Achievement. Total=English, physics and computer;
T - & gt; Achievement. Business=(English, physics and computer)/3;
Cout<" Insert success!"
}
Cout<" The student this semester grades already exists, do not insert!"
}
Void SIMS: : Modify ()
{//modify a student a semester grades
Char n [20].//the student name
Char num [20].//the student student id
Char cn [50];//the student class
Int te;//to modify the student which semester grades
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull