Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 11, 2013, 10:01 AM   #1
windels
macrumors regular
 
Join Date: Oct 2008
Location: Belgium
C++: object-oriented programming exercises

Hi!

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!
windels is offline   0 Reply With Quote
Old Sep 11, 2013, 12:07 PM   #2
ArtOfWarfare
macrumors 601
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
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...
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Sep 12, 2013, 02:53 AM   #3
windels
Thread Starter
macrumors regular
 
Join Date: Oct 2008
Location: Belgium
thank you both for the advice! I'll look into it!
windels is offline   0 Reply With Quote
Old Sep 13, 2013, 09:30 AM   #4
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
Schildt's books are bad.

- Accelerated C++ - Andrew Koenig & Barbara E Moo - http://www.acceleratedcpp.com/
- C++ Primer 4th Edition - Stan Lippmann, Josie Lajoie & Barbara Moo
- Programming: Principles and Practice using C++ - Bjarne Stroustrup - http://www.stroustrup.com/Programming/
robvas is offline   0 Reply With Quote
Old Sep 13, 2013, 12:34 PM   #5
windels
Thread Starter
macrumors regular
 
Join Date: Oct 2008
Location: Belgium
Quote:
Originally Posted by robvas View Post
Schildt's books are bad.
Yeah, I came to discover that myself. Unfortunately it was the book school recommended... Thanks for the other books. Again, I'll look into it . Thanks!
windels is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:03 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC