#include #include using namespace std; const int NAME_LEN=20; enum{MAKE=1, DEPOSIT, EXERCISE, EXIT}; enum{O2EXERCISE, NOO2EXERCISE, OUT}; enum{WALK, RUN, GO}; enum{UPDOWN, PUSHUP, SQUAT,SIDE}; class User { private: int exerID; char *cusName; int sex; int height; int weight; double calory; public: User(int ID, int usersex, char *name, int hei, int wei, double kcal); User(User &ref); int GetexerID() const; void ShowAccInfo() const; void GetKcal(double kcal); ~User(); }; User::User(int ID, int usersex, char *name, int hei, int wei, double kcal) :exerID(ID), sex(usersex), height(hei), weight(wei), calory(kcal) { cusName=new char[strlen(name)+1]; strcpy(cusName,name); } User::User(User &ref) : exerID(ref.exerID), sex(ref.sex), height(ref.height), weight(ref.weight), calory(ref.calory) { cusName=new char[strlen(ref.cusName)+1]; strcpy(cusName, ref.cusName); } int User::GetexerID() const { return exerID; } void User::GetKcal(double kcal) { calory+=kcal; } void User::ShowAccInfo() const { double bmi; bmi = weight/((height*0.01)*(height*0.01)); cout<<"ID:"<19 && bmi<25) cout<<"Á¤»ó üÁß ÀÔ´Ï´Ù"<=25 && bmi<=30) cout<<"°úüÁß ÀÔ´Ï´Ù"<30) cout<<"ºñ¸¸ ÀÔ´Ï´Ù"<>id; cout<<"À̸§ :"; cin>>name; cout<<"¼ºº°(³²:1, ¿©:2) :"; cin>>sex; cout<<"Ű:"; cin>>height; cout<<"¸ö¹«ÄÉ :"; cin>>weight; cout<<"Ä®·Î¸®·®:"<>id; cout<<"¾ó¸¶³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*30; spr.ShowKcalInfo(kcal, id); } }; void Sports::ShowKcalInfo(double kcal, int id) { for(int i=0; iGetexerID()==id) { accArr[i]->GetKcal(kcal); cout<<"Ä®·Î¸® ¼Ò¸ð¿Ï·á"<>time; kcal = time*50; cout<<"ÃÑ Ä®·Î¸® ¼Ò¸ð·®Àº "<>choice;cout<>time; kcal = time*30; cout<<"ÃÑ Ä®·Î¸® ¼Ò¸ð·®Àº "<>time; kcal = time*30; cout<<"ÃÑ Ä®·Î¸® ¼Ò¸ð·®Àº "<>time; kcal = time*30; cout<<"ÃÑ Ä®·Î¸® ¼Ò¸ð·®Àº "<>choice;cout<>choice;cout<ShowAccInfo(); cout<>choice; cout<