class Person
{
string name;
int age;
float weight;
public:
Person(string n,int a,float w) {name = n;age = a;weight = w;}
string getname() {return name;}
void setAge(int a) {age = a;}
int getAge() {return age;}
float getweight() {return weight;}
void print() {cout<<"姓名:"<<name<<",年龄:"<<age<<"体重"<<weight<<endl;}
};
class baby : public Person
{
int lovely_degree;
public:
void setLovely_degree(int d) {lovely_degree = d;}
baby(string n,int a,float w,int d) : Person(n,a,w) {lovely_degree = d;}
void print() {cout<<"姓名:"<<getname()<<",年龄:"<<getAge()<<",体重"<<getweight()<<"可爱度:"<<lovely_degree<<endl;}
};
int main()
{
Person p("Mike",4,35);
baby b("marry",3,30,6);
p.print();
b.print();
return 0;
}