Kyūkei Master Hub
SCS2108 | Phase Study Card
👁️ -- opens | 0%

Phase 1: OOP Foundations & Object Relationships

Everything in Object-Oriented Software Engineering relies on 4 Core Pillars and strict Object Relationships. Master these concepts and examiner definitions.

1. The 4 Pillars of OOP (Examiner Level)

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.
💡 Examiner Distinction Tip
Encapsulation is NOT just getters and setters! It is about protecting invariants. Mention that fields are made private to prevent unauthorized modification, enforcing valid state changes through validated methods.

2. Object Relationships (Association, Aggregation, Composition)

In SCS2108 exams, you will be asked to identify object relationships and draw their UML arrows.

A. Association (General Relationship)

A structural relationship between two independent classes ("USES-A" or "KNOWS-A"). Neither object owns the other.

B. Aggregation (Weak HAS-A Relationship)

C. Composition (Strong PART-OF Relationship)

UML Visual Comparison: Aggregation (Independent Child): [Teacher] ────────◇ [Department] (Hollow diamond at Department) Composition (Dependent Child): [Room] ────────◆ [House] (Filled diamond at House)
⚠️ Common Exam Trap
Students often swap the hollow and solid diamonds! Remember: Composition is SOLID/FILLED because the bond is unbreakable (strongest relationship).

⚡ Quick Self-Test

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?

Answer: Composition (Filled Diamond ◆).
Because the OrderItem cannot exist independently without the parent Order. Deleting the parent destroys the child records.