views:

100

answers:

3

Hi everyone. I believe that we will never learn any programming language in depth until we apply all the theories on a real world application. And I kinda suck at the creativity thing :c So I would want to ask for ideas on any simple application that the basic principles in OOP (inheritance, interface, encapsulation, and polymorphism) can be best applied.

Thanks, nef

+2  A: 

Anything with a graphical user interface tends to utilise all the OOP principles pretty quickly.

  • Event listeners implement some form of interface
  • Components inherit from other components
  • Data structures / models need to be encapsulated
  • Different GUI components can be plugged in via polymorphism

As a project, what about implementing a custom Swing GUI component, for example a chess board?

If you find that too easy, then you can always write the AI so that it plays against you....

mikera
Thanks mikera. My initial plan was to create a chat system, but I have read stuff that Java is not good for this purpose. That would lead to my next question about when is Java good, and when it is not good for a particular application ?
pneftali
@pneftali - Java would be absolutely fine for this. In fact I think it's a pretty good simple application to write as a learning project. The hardest bit would be the networking code, but I think there are some pretty good tutorials for this on the net.
mikera
A: 

if you use netbeans, you found example project. Try to understand from the project. And then read name of attribute or method. And then image work of method like behavior work. I think this is simple ways to understand OOP in my ways.

A: 

Try make a project that the user interact with a database. You will have to start making a module that handles the db part, a module that interacts with the user and something that correlates the two. For example an ordering system.

I will have that in mind, thank you :)
pneftali