Design and create a data class for that object to obey object-oriented design principles, such as encapsulation,
Question:
Design and create a data class for that object to obey object-oriented design principles, such as encapsulation, information hiding, and data abstraction. Create scenarios solving a real-world problem utilizing the data class you designed and implemented. Incorporate control structures in the implementation.
Consider the class responsibilities, determine the attributes for the class and operations (methods) associated with the data members (attributes). Design and draw complete UML diagrams, including class name, attributes, methods, visibility modifiers, etc. The data class should include at least:
- A default constructor that initializes each attribute.
- A second overloaded constructor contains parameters that will construct objects properly when an object of the type is instantiated.
- All the accessors and mutators wherever applicable for the attributes.
- Include a display method that prints out the values of data members where applicable.
- Include at least one additional implementation method providing services to applications.
For your application program, including at least two objects instantiated from the data class. One using the default constructor, One using the overloaded constructor. Demonstrate objects/instances being instantiated; values being modified (using mutators/setters) accessed (using accessors/getters), and print a final report on the screen to the user base on the scenarios.
Embed usages of control structures either in the data class implementation or in the application program.
Modern Systems Analysis And Design
ISBN: 9781292351629
9th Global Edition
Authors: Joe Valacich, Joey George