C++ Programming Homework 11 Speaker: Ching-Chen Chang Date: 2008/05/02
HW11 Student name gender age public: private: Askedby() This ia only a character point, so you need to dynamically allocate the memory space from the free store for the name of a student. This data member belongs to a enumeration data type "Gender", which has two possible values Female and Male. The reasonable value of age cannot be larger than 200, so choose an appropriate data type for it. Carefully design the constructor and destructor to allocate and release memory to store student names.
Rule The actual age of a woman is a secret. If a man asks her, then younger students (with ages less than or equal to 20) will reply an age which is 50% more, so that it sounds more "mature". On the contrary, older students will give a reply which is only 80% of her actual age, to make herself "younger". If she is asked by a female friend, she will tell the truth because her friend knows this trick. For a male student, he will tell you his actual age because there is nothing to hide.
Example Alice, Female, 28 Bob, Male, 20 Charlie, Male, 40 Denise, Female, 16 Asked ByAliceBobCharlieDenise Alice Bob20 Charlie40 Denise
Note Deadline:2008/5/4 8:30 AM Upload to the following link Project Name e.g. HW11_ Compress the folder to a ZIP or RAR file
MSDN 說明 索引