|
-
Apr 18th, 2011, 09:06 AM
#33
Re: what's so great about classes?
 Originally Posted by Jefals
No you wouldn't; remember, my qualifier -- "other than for educational purposes" -- what other purpose could you possibly have for this scenario!
"
You'd be surprised. I thought that some of those examples were contrived back when I was first reading about OO design in the 90s. In fact, there were magazine articles that made the point you have made a couple of times here about how some of these examples have no real world application. So then I made one.
The design was aquatic organisms in a lake. So I had a class for Fish, with child classes called things like Bass, Pike, and Sunfish. They had methods such as Swim. It was nearly a stereotypical OO example, yet it had practical application.
So, as trite as the example may appear, it isn't true that they won't have real world application.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|