Lab Act_Basic OOP Assignment
Lab Act_Basic OOP Assignment
1. Understand and implement encapsulation by creating private variables with getter and setter methods.
2. Use inheritance to establish a parent-child class relationship.
3. Apply abstraction to define abstract classes and methods.
4. Demonstrate polymorphism by overriding methods and using dynamic method dispatch.
General Instructions:
Task 1: Encapsulation
Sample run:
Task 2: Inheritance
Sample run:
Task 3: Abstraction
Note:
• Let user enter the value for radius, length and width
• format the area of circle in 2 decimal places