Presentation is loading. Please wait.

Presentation is loading. Please wait.

C++ Programming Homework 11 Speaker: Ching-Chen Chang Date: 2008/05/02.

Similar presentations


Presentation on theme: "C++ Programming Homework 11 Speaker: Ching-Chen Chang Date: 2008/05/02."— Presentation transcript:

1 C++ Programming Homework 11 Speaker: Ching-Chen Chang Date: 2008/05/02

2 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.

3 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.

4 Example Alice, Female, 28 Bob, Male, 20 Charlie, Male, 40 Denise, Female, 16 Asked ByAliceBobCharlieDenise Alice2822 28 Bob20 Charlie40 Denise1624 16

5 Note Deadline:2008/5/4 8:30 AM Upload to the following link  http://ms11.voip.edu.tw/cs102/ http://ms11.voip.edu.tw/cs102/ Project Name  e.g. HW11_91234567 Compress the folder to a ZIP or RAR file

6 MSDN http://www.msdn.com 說明  索引


Download ppt "C++ Programming Homework 11 Speaker: Ching-Chen Chang Date: 2008/05/02."

Similar presentations


Ads by Google