Monday, May 24, 2010

How can i make a modular program in java?

I still dont know how to make an object oriented program in java. Would anyone please teach me%26gt;??

How can i make a modular program in java?
Keep your methods and classes closed. When you start to see the same code (or similar code with predictable variations) popping up in a couple different places, look for a way to pull that code into its own method or class to promote reuse.
Reply:If you separate each logical element of your problem and implement each as different classes it would be OO, and as there will be separate .class files generated it would be modular and you could reuse those classes on different applications. An example division to classes : customer, order, invoice, product





Loren Soth
Reply:Java by its nature is both modular and object oriented. So if you write your java program in the usual java way, you will get what you want.

brandon flowers

No comments:

Post a Comment