As for exercises, here are some that are even practical:
1. class circle;
Here you should use a main method that defines a circle if there isn't one inside the object. To keep the circle defined inside, just use a string object. Also add a method which draws another circle in the string, a fillCircle() function, and so on (things that are helpful when you create a circle and want to do something to it while it's outside of the object, line in a string in the main() function).
2. a class for buttons:
Just a class that outputs images of buttons (either predefined or even customized by the user, or taking the texture/text from a file) and an action that the button does.
An example of what I once did is writing an options class. With it you could enter "background" and "font" color sections, and change it in real time. The console would literally go through the rainbow with its colors (one at a time).
3. something that is game based:
Use physics, such as falling, jumping, getting pushed, bumping into a wall and so on, creating specific methods.
Eg.:
1 2 3 4 5 6 7 8
|
void character::functionFall()
{
//underCharacter is a fragment of string present under your character (can be a square 5x5)
if (underCharacter==" ")
{
yCoordinate--;
}
}
|
(But of course there's more to it that what i've just shown you.)
4. and, the most important one, a bigInt class.
Make 2 of these objects meet in adding, subtracting, multiplying, dividing, verifying equality and attributing, making them practically infinitely large if you want them to be.