Abstract Class You need to design at least three classes, one abstract class, and two concrete classes.

computer science

Description

1. Abstract Class You need to design at least three classes, one abstract class, and two concrete classes. Abstract class consists of all common attributes and behavior that both of concrete class had. Concrete class consist of specific attribute and behavior that not common between the concrete classes 

2. Encapsulation To hide the data of a class from an illegal direct access, all of the attributes of the class must be encapsulated and will be accessed using an accessor and mutator that may perform validation before accessing the encapsulated attribute 

3. Inheritance All of the concrete class must inherit all attribute and behavior from the abstract class 

4. Polymorphism If the concrete class has a specific implementation of the inherited behavior (method) that differ from the abstract class, the concrete class can override or overload the behavior from the abstract class 

5. Composition The composition concept in OOP is a strong relationship between objects that means some object must coexist together and cannot exist independently. The type of relationship with the composition concept is ‘part-of’. If any of the class contains other classes, then composition concept should be used to implement the feature

Instruction Files

Related Questions in computer science category