Cohesion: How closely related the responsibilities of a class or module are. High cohesion is preferred, meaning each module or class has a clear, single responsibility.
Coupling: Degree of dependency between classes or modules. Low coupling is ideal to ensure independence and flexibility in the system.
🔹 2. OOD Key Concepts
Abstraction
Definition: Simplifies complexity by focusing on essential features, hiding implementation details.
Example: A Shape class hides specific details of shapes like Circle and Rectangle and exposes only general features like Draw().
Encapsulation
Definition: Restricts direct access to some of an object's components, bundling data with methods to protect it.
Usage: Commonly achieved in C# through private fields and public properties.
🔹 3. Identifying Classes and Methods in OOD
Classes: Typically represent nouns in problem descriptions (e.g., Student, Course).
Methods: Often correspond to verbs, representing actions or behaviors (e.g., Enroll, UpdateStatus).
🔹 4. User Stories and Their Role in OOD
Structure of a User Story
Format: “As a [user type], I want to [perform action] so that [achieve benefit].”
Purpose: Helps in understanding user needs and prioritizing features.
Components:
Persona: User type (e.g., “Unit Coordinator”)
Action: Specific task (e.g., “Create a unit with a code, name, and student count”)
Ideal for: Projects with clear, unchanging requirements.
Downside: Difficult to go back and make changes after a stage is completed.
Iterative and Incremental Model
Process: Develops the system through repeated cycles (iterations) and adds functionality in small chunks (increments).
Ideal for: Projects where requirements evolve or need refinement over time.
Benefit: Allows for continuous testing and adaptation.
🔹 6. UML Class Diagrams - Focus on Relationships
Purpose: Graphically represents classes, attributes, methods, and relationships.
Common Relationships in Class Diagrams
Association (uses-a): Two classes collaborate without a strong dependency (e.g., Teacher uses Student in Teach(Student student)).
Aggregation (has-a): An object contains another, but they can exist independently (e.g., Library has Books).
Composition (part-of): A strong ownership where the lifecycle of the contained object depends on the containing object (e.g., Car has Engine, and when Car is destroyed, so is Engine).
Inheritance (is-a): A derived class shares attributes and behaviors from a base class (e.g., Employee is a Person).
UML Notations:
Visibility:
+ Public
- Private
# Protected
Arrows for Inheritance: Solid line with an empty arrowhead.
✨ Quick MCQ Tips
Focus on Definitions: Know what each OOD concept (abstraction, encapsulation, cohesion, coupling) means.
Class Relationships: Be able to identify and distinguish between composition, aggregation, association, and inheritance.
Understand User Stories: Recognize the structure and purpose, especially how they help clarify user needs and prioritize features.
Model Differences: Be clear on differences between Waterfall (sequential) and Iterative (incremental, adaptable).
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (