Everything in Object-Oriented Software Engineering relies on 4 Core Pillars and strict Object Relationships. Master these concepts and examiner definitions.
You cannot just say "Inheritance means reusing code". Write these exact definitions in exams:
| Pillar | Examiner Definition | Key Advantage / Buzzwords |
|---|---|---|
| Abstraction | Hiding internal implementation details and showing only essential features of an object to the user. | Reduces complexity, decouples implementation from usage interface. |
| Encapsulation | Bundling data (attributes) and methods that operate on data into a single unit (class) while restricting direct access using private visibility and getters/setters. | Data hiding, access control, protection of object state integrity. |
| Inheritance | A mechanism where a child class (subclass) inherits properties and behaviors from a parent class (superclass), establishing an IS-A relationship. | Code reusability, hierarchical classification, foundation for polymorphism. |
| Polymorphism | The ability of an object or method to take on multiple forms (Static/Overloading vs Dynamic/Overriding). | Extensibility, interface uniformity, loose coupling. |
private to prevent unauthorized modification, enforcing valid state changes through validated methods.
In SCS2108 exams, you will be asked to identify object relationships and draw their UML arrows.
A structural relationship between two independent classes ("USES-A" or "KNOWS-A"). Neither object owns the other.
Department and Teacher. (If the Department closes, the Teacher still exists in the university system).Car and Engine, or House and Room. (If the House is demolished, the Rooms cease to exist).Test your understanding before moving to Phase 2:
Q: In an e-commerce system, an Order contains OrderItem objects. If the Order is deleted from the database, all its OrderItem records are automatically deleted. Is this Aggregation or Composition?
OrderItem cannot exist independently without the parent Order. Deleting the parent destroys the child records.