|Sep 11, 2013, 10:01 AM||#1|
C++: object-oriented programming exercises
for my master thesis I'm expected to programm using C++. I already worked my way through: C++ A Beginnerís Guide by Herbert Schildt. I get most of it, but I need some more excercises in order to improve my skills.
More in particular I'm looking for (preferably online) exercises and solutions that focus on object-oriented programming( i.e. the use of classes). To be clear,I don't really need any more exercises that focus on pure syntax (e.g. exercises on arrays, pointers...)
I already started working my way through these excercises. Any other suggestions?
Thank you in advance!
|Sep 11, 2013, 12:07 PM||#2|
Those exercises don't seem to cover inheritance in any way.
Adding on to those exercises (I'm making this up on the fly)
10 - Make a class called person, having a name and sex. Have student inherit from person.
11 - Also give person a description method. Have that print out the name and sex of the person. Have student use person's description method, and then also print out the total score of the student.
12 - Make a new class called score which stores three integer: points possible, points earned, and percentage. Replace all the score properties on student with that score class.
C++ has multiple inheritance... no exercise is coming to mind for integrating that into what you're already using...
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
|Sep 13, 2013, 09:30 AM||#4|
|Sep 13, 2013, 12:34 PM||#5|
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Resolved: How do I convert an NSData object to an NSDictionary object, and vice versa?||moonman239||iPhone/iPad Programming||6||May 2, 2014 01:17 PM|
All times are GMT -5. The time now is 07:54 PM.