#include<iostream>
using namespace std;
class Dog{
public:
Dog(int Age,int Weight);  //构造函数
Dog(Dog&gou);  //复制构造函数
int setAge(int Age);
int setWeight(int Weight);
int getAge();
int getWeight();
~Dog(){
cout<<"~Dog"<<endl;
}  //析构函数
private:
int age,weight;
};
Dog::Dog(int Age,int Weight){
age=Age;
weight=Weight;
}
Dog::Dog(Dog&gou){
age=gou.age;
weight=gou.weight;
cout<<"OK,success"<<endl;
}
int Dog::setAge(int Age){
age=Age;
}
int Dog::setWeight(int Weight){
weight=Weight;
}
int Dog::getAge(){
return age;
}
int Dog::getWeight(){
return weight;
}
int main(){
int age,weight;
Dog dog(5,30);
Dog b=dog;
cout<<b.getAge()<<endl;
cout<<"Jack is "<<dog.getAge()<<" years old,and "<<dog.getWeight()<<" pounds weight!"<<endl;
cin>>age>>weight;
dog.setAge(age);
dog.setWeight(weight);
cout<<"Now,Jack is "<<dog.getAge()<<" years old,and "<<dog.getWeight()<<" pounds weight!"<<endl;
return 0;
}