-
Notifications
You must be signed in to change notification settings - Fork 0
Topic 1: Review OOP
Zhamri Che Ani edited this page Apr 10, 2026
·
3 revisions
To reinforce students’ understanding of fundamental Object-Oriented Programming (OOP) concepts as a foundation for developing enterprise-level applications using Java.
Students should be able to:
- Explain core OOP concepts including objects, classes, and packages
- Apply inheritance and polymorphism in Java programs
- Differentiate between access modifiers (public, protected, private)
- Design abstract classes and implement interfaces
- Object-Oriented Programming Concepts
- Objects and Classes
- Packages
- Inheritance
- Extending classes
- Reusing fields and methods
- Polymorphism
- Method overriding
- Dynamic binding
- Access Modifiers
- public, protected, private
- Abstract Classes
- Abstract methods
- When to use abstraction
- Interfaces
- Defining contracts
- Implementing interfaces
Activity: Designing a Simple Class Hierarchy
Students are required to:
- Create a base class: Vehicle
- Attributes: brand, speed
- Method: displayInfo()
- Create subclasses using inheritance:
- Car
- Motorcycle
- Apply Polymorphism:
- Override displayInfo() in each subclass
- Each class should display different information
- Use Access Modifiers:
- Apply private, protected, and public appropriately
- Create an Interface: Drivable
- Method: drive()
- Implement this interface in Car and Motorcycle
- Use Abstract Class (Optional Enhancement):
- Convert Vehicle into an abstract class
- Add abstract method startEngine()
- Oracle Java Documentation – OOP Concepts https://docs.oracle.com/javase/tutorial/java/concepts/
- Online tutorial: https://www.w3schools.com/java/java_oop.asp