Chapter 4 Object Oriented Paradigm

OO Principles

Encapsulation

Inheritance

Polymorphism

Purpose: separate interface from implementation. By hiding the implementation details that are likely to change -> allows for flexibility in design, easy teamwork working.

Inheritance allows software reuse, hence improving the effectiveness of software development.

Refer to ability of an object to behave differently and assume different forms based on its inheritance hierarchy.

Introducing the object-oriented paradigm

Class

Accessibility Principle

Relationship Among Classes

External Link

Association Relation

Aggregation relation

Composition Relation

Differences between Composition and Aggregation

Generalization relation

Inheritance vs. Composition

General Principle

Case Study Example - OPS

OO Analysis

Step 1: Design of Use Case Diagram

Step 2: Analysis Class Diagram

OO Design

Step 1: CRC Card Approach

Step 2: Construct Interaction Diagram

Step 3: Build State Chart

Step 4: Class Design

Use Case is a way that a user accesses the system

also called “Concepts Class Diagram”

Class-Responsibility-Collaborator

Process: reconstruct the flow of events using sequence diagram

Describe the life-cycle of an object

Nail down the interface of each class