#include #include using namespace std; const int NAME_LEN=20; enum{MAKE=1, DEPOSIT, EXERCISE, EXIT}; enum{O2EXERCISE=1, NOO2EXERCISE=2, OUT=3}; enum{WALK=1, RUN=2, GO=3}; enum{UPDOWN, PUSHUP, SQUAT,SIDE}; enum{FEMALE=1, MALE=2}; class User { private: int exerID; char *cusName; int height; int weight; double calory; public: User(int ID, 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,char * name, int hei, int wei, double kcal) :exerID(ID), height(hei), weight(wei), calory(kcal) { cusName=new char[strlen(name)+1]; strcpy(cusName,name); } User::User(User &ref) : exerID(ref.exerID), 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; } User::~User() { delete [] cusName; } 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<<"ºñ¸¸ ÀÔ´Ï´Ù"<>sel; if(sel==FEMALE) MakeFemaleUser(); else MakeMaleUser(); } void Sports::MakeFemaleUser(void) { int id; char name[NAME_LEN]; int height; int weight; double kcal = 0; int rate; rate = 80; cout<<"[»ç¿ëÀÚ µî·Ï]"<>id; cout<<"À̸§ :"; cin>>name; cout<<"Ű:"; cin>>height; cout<<"¸ö¹«ÄÉ :"; cin>>weight; cout<<"Ä®·Î¸®·® : "<>id; cout<<"À̸§ :"; cin>>name; cout<<"Ű:"; cin>>height; cout<<"¸ö¹«ÄÉ :"; cin>>weight; cout<<"Ä®·Î¸®·® :"<>sel;cout<>id; cout<<"¾ó¸¶³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*10; ShowKcalInfo(kcal, id); } void Sports::run(void) { int id; int time; double kcal; cout<>id; cout<<"¾ó¸¶³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*25; ShowKcalInfo(kcal, id); } void Sports::updown(void) { int id; int time; double kcal; cout<>id; cout<<"¸î°³³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*20; ShowKcalInfo(kcal, id); } void Sports::pushup(void) { int id; int time; double kcal; cout<>id; cout<<"¸î°³³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*30; ShowKcalInfo(kcal, id); } void Sports::squat(void) { int id; int time; double kcal; cout<>id; cout<<"¸î°³³ª ÇϽðڽÀ´Ï±î?";cin>>time; kcal = time*35; ShowKcalInfo(kcal, id); } void Sports::nooxexercise(void) { int choice; cout<<"[¹«»ê¼Ò ¿îµ¿]"<>choice;cout<>sel;cout<ShowAccInfo(); cout<GetexerID()==id) { accArr[i]->GetKcal(kcal); cout<<"Ä®·Î¸® ¼Ò¸ð¿Ï·á"<>choice; cout<