//Ex6_15.cpp
#include "iostream" 
#include "cstring"
using namespace std;
class Person
{private:
   char name[20];
   char sex;
   int age; 
 public:
   void display()
	{cout<<name<<":"<<sex<<","<<age<<endl;}
   Person(char *n,char s,int a)
	{strcpy(name,n);
     sex=s;
     age=a;}
};
class Student:public Person
{private:
    int id;   
    char classname[10];  
 public:
	void show()
	{cout<<classname<<"-"<<id<<"  ";  
     display();}
	Student(char *c, int i,char *n,char s,int a):Person(n,s,a)
	{strcpy(classname,c); 
     id=i;}
};
void main() 
{Student s("Math1",89017,"ChengHong",'w',19); 
 s.show(); 
}
