tags:

views:

227

answers:

4

I'm working with someone who's looking to get back into programming after several years of IT support work. They know all the iterative programming basics and have used them frequently, but their only object-oriented programming experience was in college. The goal is to come up with a decent-sized project that is good for illustrating and practicing OO concepts. Has anyone ever used or thought of a good problem domain for an introduction to OO? I'm looking for a domain where concepts such as inheritance, abstraction and polymorphism really make sense and provide an advantage when modeling with the classes.

Of course, I did some googling and found the popular ATM and Address Book OO examples. They're both pretty good, but ATM is a little more complex than what I'm looking for. Address Book may be decent, but I think it might not be complex enough, or a clear enough domain for modeling objects. The goal is for the project to take a decent amount of effort to complete, not something that can be completely done in an afternoon or two.

As for implementation specifics, the project will be implemented as a Java console app with a minimal UI. Learning the OO concepts and how to implement them in Java is the primary purpose of this app.

+1  A: 

I like casino game simulation. Simulation is one of the application domains that lead to the development of OO programming. Casino games are relatively simple but with some sophistication.

You can look at http://homepage.mac.com/s_lott/books/oodesign.html.

S.Lott
Thanks, I'll take a look! When I click your link, I get an "Account Error" page, but converting the %5F to _ fixes the problem (as does a google search).
Kaleb Brasee
I like this idea. The simulation type of apps are going to be interesting enough to hold attention, whilst being well understood enough to get clear cut descriptions.
Glenn Condron
Fixed the link (markdown doesn't like my URL.)
S.Lott
A: 

Along the same lines as address book, a general catalog (cds, books, dvd, equipment & so on). The idea here, you have a base item that is extended by all the other types (inheritance) and each one can implement a specific interface for display and other purposes (polymorphism).

Shane C. Mason
Reminds me of the schooling days... *yawn* ( + 1 )
o.k.w
Yeah, a catalog is a solid idea, I'm considering that since it does work. I used it for a project (a mini-web store) back in college, so I might be able to borrow some requirements from that.
Kaleb Brasee
bad idea; it will re-enforce the invalid notion that objects in OOP correspond to real world objects
hasen j
+4  A: 

How about a text based adventure game?

cletus
Interesting... at first I was like "Wait, what?", but when you think about, it seems like it might just work. And it's definitely different!
Kaleb Brasee
Games are naturally more engaging to programmers I think and a text-based adventure game is easy to understand and doesn't bog you down in learning complex APIs or maths (3D) like a graphical game would.
cletus
An extension for this might be a MUD or MOO. A multiplayer text based adventure game.
Glenn Condron
@Caelum: possibly but that adds networking complexity. Also, the core of a text based adventure game could be applied to the MUD/MOO domain too (later). Also I tend to find that if you get overly ambitious on something like this it quickly gets abandoned.
cletus
Good idea cletus, I'm going with it!
Kaleb Brasee
A: 

When I've taught other people how to understand OO-principles, I've asked them to relate to OO-programming as if they were building a house. A house has everything you need.

CodeMonkey