It would probably make sense to look at someone else's code first, to see if you get what's going on. (Issues: make sure it's a good -- enough -- example!)
Then redo it yourself, without referring to the original, checking to see how your solution compares to theirs when you're done.
And then do something different all of your own!
but the code examples are really boring everywhere |
Too true!
I have had a quick look around to find a resonable example, but a lot of the examples on the web rush into coding too quickly; they don't justify their design in a clear enough way. I will have another look, on the off chance I can find a reasonable example, but if anyone has seen a good example in C++ (or a similar language -- translating Java or C# to C++ isn't that hard!) then I'd like to know.
Andy
PS I can understand why C++ isn't recommended as the language to use when learning OOA/D, but if you already get classes, inheritance, member visibility, polymorphism, etc. it shouldn't be a problem for you. You don't need to know all of C++ to use it for OO programming!