Software Engineering

Software Engineering Unit 5: Object-Oriented Analysis, Design & UML Diagrams

Software Engineering Unit 5: Object-Oriented Analysis, Design & UML Diagrams

High-Yield Revision Hub

Master Software Engineering Unit 5: Object-Oriented Analysis, Design & UML Diagrams

Comprehensive Unit 5 notes covering Object-Oriented Analysis & Design (OOAD), Data Modeling, Class/Object relationships (Association, Aggregation, Composition, Generalization), and Structural & Behavioral UML Diagrams.

Concept Breakdown

Detailed technical explanation

UNIT 5: Object-Oriented Analysis (OOA) & Design (OOD): OOA Modeling, Data Modeling, OOD Concepts, Class & Object Relationships, Object Modularization, Introduction to UML

5.1 Object-Oriented Analysis & Modeling

OOA focuses on identifying domain objects, their responsibilities, and relationships from real-world problem statements.

Key OOAD Principles

  1. Encapsulation: Bundling attributes and methods into a single class unit while protecting data via private access modifiers.
  2. Abstraction: Exposing essential contract features while suppressing internal algorithms.
  3. Inheritance: Subclasses acquire properties and methods of superclasses (is-a taxonomy).
  4. Polymorphism: Ability of a single interface to invoke dynamic method behaviors at runtime.

5.2 Class & Object Relationships

1. Association

A general semantic link between two independent classes (e.g., Student attends Course). Can be Unidirectional or Bidirectional with Multiplicity (1..1, 1..*, 0..*).


2. Aggregation

A weak "has-a" structural relationship where child objects can exist independently of parent object lifecycles.

  • Visual Notation: Line with an Open (unfilled) Diamond at parent end.
  • Example: Department and Professor. Deleting a Department does NOT destroy Professor objects.

3. Composition

A strong "part-of" structural relationship where child object lifecycles are bound strictly to parent object lifecycles.

  • Visual Notation: Line with a Filled (black) Diamond at parent end.
  • Example: Building and Room. Deleting a Building automatically destroys all its Rooms.

4. Generalization / Inheritance

An "is-a" taxonomy relationship where a specialized subclass inherits attributes and methods from a general superclass.

  • Visual Notation: Line with an Open Triangular Arrowhead pointing towards superclass.
  • Example: Car is a Vehicle.

5.3 Introduction to Unified Modeling Language (UML)

UML is a standardized graphical modeling language developed by Grady Booch, James Rumbaugh, and Ivar Jacobson (Object Management Group - OMG).

Categorization of UML Diagrams

UML Diagrams | +-----------------+-----------------+ | | Structural Diagrams Behavioral Diagrams - Class Diagram - Use Case Diagram - Object Diagram - Sequence Diagram - Component Diagram - Activity Diagram - Deployment Diagram - State Machine Diagram - Package Diagram - Communication Diagram

5.4 Detailed Breakdown of Key UML Diagrams

1. Class Diagram (Structural)

Static structural diagram depicting system classes, attributes, operations (methods), access visibility (+ public, - private, # protected), and relationships.


2. Use Case Diagram (Behavioral)

Models user functional goals and system scope.

  • Actor (Stick Figure): External entity interacting with system.
  • Use Case (Oval): Named sequence of actions delivering measurable value to actor.
  • Relationships:
    • <<include>>: Mandatory sub-use case executed every time base use case runs (e.g., Withdraw Cash <<includes>> Authenticate PIN).
    • <<extend>>: Optional/conditional sub-use case executed only when specific conditions occur (e.g., Withdraw Cash <<extends>> Print Receipt).

3. Sequence Diagram (Behavioral / Interaction)

Emphasizes Time Ordering of messages passed between object lifelines.

  • Lifeline (Vertical Dashed Line): Represents existence of an object instance over time.
  • Activation Box (Rectangle on lifeline): Indicates time period during which object is performing an operation.
  • Synchronous Message (Solid Arrow head): Sender waits for response.
  • Asynchronous Message (Half-stick Arrow head): Sender does not wait for response.
  • Return Message (Dashed Arrow head): Returns control/result to caller.

4. Activity Diagram (Behavioral)

Work-flow diagram depicting operational activities, decision branching (<>), and parallel concurrency using Forks (split 1 flow into parallel flows) and Joins (merge parallel flows into 1 flow).


5. Statechart / State Machine Diagram (Behavioral)

Depicts state transitions of a single reactive object in response to discrete events throughout its lifecycle. Includes Initial State (filled circle), Transitions, and Final State (bullseye circle).

Key Revision Rules

Essential formulas and core points to memorize

  • 1Aggregation is a weak 'has-a' relationship (independent lifetimes, open diamond).
  • 2Composition is a strong 'part-of' relationship (bound child lifetime, filled black diamond).
  • 3Generalization represents an 'is-a' inheritance taxonomy (open triangular arrowhead).
  • 4Class Diagram is a Structural UML diagram depicting static system structure.
  • 5Use Case Diagram features Actors, Use Cases, <<include>> (mandatory), and <<extend>> (optional).
  • 6Sequence Diagram is an Interaction diagram emphasizing TIME ORDERING of messages along vertical lifelines.
  • 7Activity Diagram models concurrent workflows using Forks (split) and Joins (merge).
  • 8Statechart Diagram depicts state transitions of a single reactive object throughout its lifecycle.

Common Exam Mistakes

Where students frequently lose marks

Confusing Aggregation (independent child life) with Composition (bound child life).
Confusing UML <<include>> (mandatory step executed every time) with <<extend>> (optional/conditional step).
Confusing Sequence Diagrams (time-ordered focus) with Communication/Collaboration Diagrams (structural path focus).

Topic Quiz Practice

No Questions

No practice questions available for this topic yet.