mitalisingh27
Jun 15, 2016, 06:01 AM
While creating programs using functions when printing 2 employee details why is it necessary to create 2 objects when one object can do the work
CravenMorhead
Jun 15, 2016, 07:11 AM
Why do you think? The answer is pretty obvious when you look at proper Object Oriented design.
Object oriented design is helpful because you can use your self-contained objects to model real life, or at least the application you're trying to develop. So given that you're trying to model the student population at a school, what do you think? Should you have one object that contains the entire student body? Or do you think that you should have one object per student?