Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 4: Object-Oriented Paradigm - Coggle Diagram
Chapter 4: Object-Oriented Paradigm
Concept
Encapsulation
Inheritance
Polymorphism
Basic Pattern
Interface
Abstract Parent Class
Private Methods
Accessor Methods
Constant Data Manage
Immutable Object
Monitor
Classes and Objects
Classes
Groups together related data and their operations
Defines the attributes and behaviors shared by all of its objects
Objects
Is an instance of a class
Relationships
Composition
Aggregation
Association
Inheritance
Design Principles
Principle of Decoupling
Benefits
Less interdependency
Easy extension
Simplicity and elegance in implementation
Ensuring Cohesion
Cohesion
1 single class
performs a set of closely related operations
Open-Closed Principle
Guidelines
Open to extension
Closed to modification
Implications
Separate interface and implementation
Keep attributes private
Minimize the use of global variables
OO Analysis
Step 1: Design of a UML Use Case Diagram
Step 2: Develop an Analysis Class Diagram via Noun Extraction
OO Design
Step 1: Identify Classes—CRC Card
Step 2: Construct an Interaction Diagram
Step 3: Build a State Machine Diagram
Step 4: Class Specification