I'm writing a pretty basic program using
Java, and I don't have very much experience. I'm trying to design the program properly, but most of my design experience comes from using VB and I would like to do this properly, in a *real* OO way for a change.
The program basically has "employee" and "dependent" data that I'm treating as objects. In my main class file where I will manipulate all of the other classes, I would like to be able to manipulate these classes very easily.
To do this in VB, I would first (of course) create the Employee and Dependent classes. Next, I would create an Employee
s and a Dependents
s class. I would then, for example, have the Employee
s class handle all of the heavy lifting that would be needed to manipulate multiple Employee objects (like managing a stack or Vector or whatever). In my main class, I would only reference the Employee
s class and I would never instantiate an Employee class.
Clear as mud? Is this a common practice in Java, or do you usually handle all of the object instances in your "main" class? What would you recommend?
Thanks in advance for any help!