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
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
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?
All times are GMT -7. The time now is 09:14 AM. |