0% found this document useful (0 votes)
13 views5 pages

UML Object Modeling Techniques

The document provides an overview of Unified Modeling Language (UML) and its application in software engineering, emphasizing its role in system design, documentation, and stakeholder communication. It details various UML diagrams such as Class, Use Case, Activity, Sequence, Communication, and Statechart diagrams, along with examples and tips for effective usage. Additionally, it covers Object-Oriented Analysis and Design (OOAD) principles and their practical applications in real-world projects.

Uploaded by

poojagomathi96
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views5 pages

UML Object Modeling Techniques

The document provides an overview of Unified Modeling Language (UML) and its application in software engineering, emphasizing its role in system design, documentation, and stakeholder communication. It details various UML diagrams such as Class, Use Case, Activity, Sequence, Communication, and Statechart diagrams, along with examples and tips for effective usage. Additionally, it covers Object-Oriented Analysis and Design (OOAD) principles and their practical applications in real-world projects.

Uploaded by

poojagomathi96
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Object Modelling Using UML – Extended Class Notes

1. Unified Modeling Language (UML)

UML is not a programming language but a modeling language that helps software engineers:

• Design systems visually.


• Document design decisions.
• Communicate ideas effectively among stakeholders.

Real-World Analogy: Think of UML like blueprints for a building. They don't build the building, but they are
essential for designing it before construction starts.

Use in Development Phases:

• Requirement Analysis: Use Case Diagrams


• Design: Class, Sequence, Activity, State Diagrams
• Implementation & Testing: Class and Component Diagrams

2. UML Diagrams Overview

Diagram Type Description View Type

Class Diagram Static structure of classes and relationships Structural

Use Case Diagram Interactions between users and system Functional

Activity Diagram Workflow of processes Behavioral

Sequence Diagram Time-sequenced object interactions Interaction

Communication Diagram Object collaboration Interaction

Statechart Diagram Lifecycle of an object Behavioral

3. Use Case Model

Extended Example – Library Management System:

• Actors: Librarian, Member


• Use Cases: Issue Book, Return Book, Search Catalog, Pay Fine

Real-Time Usage:

• Helps in stakeholder meetings to gather requirements.

1
• Used by QA teams to derive test cases.

Diagram Tip: Always place actors outside the system boundary box, use lines without arrows to connect to
use cases.

4. Class Diagram

Detailed Example – Hospital Management System:

• Classes: Patient, Doctor, Appointment, Prescription

Relationships:

• A Doctor can have multiple Appointments (1-to-many)


• A Prescription is composed of multiple Medicines (composition)

Design Note:

• Show access modifiers: "+" (public), "-" (private), "#" (protected)


• Abstract classes italicized

Diagram Insight:

+-------------------+
| Doctor |
|-------------------|
| -id: int |
| -name: String |
|-------------------|
| +prescribe(): void|
+-------------------+

5. Activity Diagram

Example – Online Food Delivery System:

• Activities: Select Food → Place Order → Payment → Track Delivery → Receive Food

Key Concepts:

• Guards (conditions) on decision branches: [Payment Success] / [Payment Fail]


• Merge nodes help combine branches

Diagram Tip: Use rounded rectangles for actions, diamonds for decisions, bars for forks/joins.

2
6. Interaction Diagrams

a) Sequence Diagram

Example – Booking a Train Ticket:

• Objects: User, Booking Page, Payment Gateway, Confirmation Page

Message Flow:

1. User logs in
2. Selects train
3. Proceeds to payment
4. Receives confirmation

Design Detail:

• Use return messages (dashed arrows) for acknowledgements


• Activation boxes show object is "doing something"

b) Communication Diagram

Example – Chat Application:

• Objects: User1, User2, Server


• Message Numbers: 1, 1.1, 1.2 to represent call order

7. Statechart Diagram

Detailed Example – Order Lifecycle:

• States: New → Processing → Shipped → Delivered → Cancelled/Returned


• Transitions triggered by: payment confirmation, shipping, delivery

Key Features:

• Entry/exit actions: entry/do: or exit/do:


• Internal events do not trigger state changes but cause activities

Diagram Tip: Use a filled black circle for initial state and a circle with a dot for final state.

8. Object-Oriented Analysis and Design (OOAD)

Extended Phases & Real-World Examples:

3
1. OOA – Object-Oriented Analysis

• Focus: What the system should do


• Tools: Use Case Diagrams, Class Diagrams
• Example: Analyzing user roles and goals in an e-learning platform

2. OOD – Object-Oriented Design

• Focus: How the system will do it


• Tools: Sequence Diagrams, Activity Diagrams, State Diagrams
• Design Patterns: Singleton, Observer, MVC used here

Example Project – Ride Booking App:

• OOA: Identify classes like Rider, Driver, RideRequest


• OOD: Define interactions using sequence diagrams

9. Design Principles in Practice (From Pressman)

Principle Description

Encapsulation Bind data and methods that operate on data

Inheritance Derive new classes from existing ones

Polymorphism Same operation behaves differently on classes

Abstraction Focus on essential attributes and hide complexity

Class Example Demonstrating All Four:

abstract class Vehicle {


int speed;
abstract void move(); // Abstraction & Polymorphism
}

class Car extends Vehicle {


void move() { [Link]("Car moves on roads"); } // Inheritance &
Polymorphism
}

4
Conclusion

These detailed notes extend the foundational content by Pressman and provide real-world analogies,
diagrams, and modeling tips that make UML and OOAD highly applicable in software engineering
education and practice. These can be used for lectures, assignments, or self-study.

Would you like accompanying visual diagrams or example problems with answers next?

Common questions

Powered by AI

A sequence diagram focuses on the chronological sequence of message flows between objects over time, emphasizing the order and timing of operations. It provides a detailed view of the message sequence. In contrast, a communication diagram (also known as a collaboration diagram) highlights the structural organization and links among objects, with emphasis on the messages exchanged but not explicitly in a sequential order. This makes communication diagrams more about relational contexts than temporal sequences .

UML assists software engineers by providing a visual design system that helps document design decisions and communicate ideas effectively among stakeholders. It supports various development phases: for Requirement Analysis, UML uses Use Case Diagrams; for Design, it uses Class, Sequence, Activity, and State Diagrams; and for Implementation & Testing, it employs Class and Component Diagrams .

UML diagrams are categorized based on their purpose and scope. Class Diagrams depict the static structure of classes and relationships, embodying the structural view. Use Case Diagrams illustrate interactions between users and the system, serving the functional view. Activity Diagrams map workflows and processes, offering a behavioral perspective. Sequence and Communication Diagrams present time-sequenced and object collaboration interactions respectively, within the interaction view. Finally, Statechart Diagrams reflect the lifecycle of an object through a behavioral view .

In the context of OOAD, the object-oriented analysis (OOA) phase focuses on identifying what the system should do, utilizing tools like Use Case Diagrams and Class Diagrams to analyze user roles and goals. For example, in an e-learning platform, it involves identifying and articulating user interactions and needs. Conversely, object-oriented design (OOD) concentrates on how the system will accomplish these tasks using tools such as Sequence Diagrams, Activity Diagrams, and State Diagrams. It involves defining the interactions and architecture necessary to meet the requirements identified during OOA, demonstrated through projects like a ride booking app .

In an activity diagram, guards are represented by conditions, such as [Payment Success] or [Payment Fail] on decision branches. Decision points use diamonds, while actions use rounded rectangles. These elements guide the flow of activities by determining the path taken based on conditions. Merge nodes serve to combine branches back into a unified flow. This structure is crucial in modeling the workflow of processes such as an online food delivery system .

In a library management system use case model, actors such as the Librarian and Member should be placed outside the system boundary box and connected to use cases using lines without arrows. They may participate in functionalities like issuing a book, returning a book, searching the catalog, and paying a fine. This model helps facilitate stakeholder meetings for requirement gathering and is also useful for QA teams in deriving test cases .

Design principles enhance software development by enabling modular, reusable, and maintainable code structures. Encapsulation binds data and methods, protecting internal object states from external manipulation. Inheritance allows the creation of new classes based on existing ones, facilitating code reuse and organization. Polymorphism enables operations to behave differently across classes, offering flexibility and generic handling of objects. Abstraction focuses on essential attributes and conceals unnecessary complexity, promoting simpler interfaces and more robust models. These principles collectively contribute to cleaner and more efficient design .

In a class diagram, particularly in a hospital management system, relationships may include a 1-to-many relationship, such as a Doctor having multiple Appointments. Composition is represented between classes like Prescription and Medicines. Notations include access modifiers such as "+" for public, "-" for private, and "#" for protected attributes or methods. Abstract classes are italicized to indicate that they cannot be instantiated directly .

In sequence diagrams, activation boxes indicate the period during which an object is active and "doing something," which typically correlates with operation execution. They differ from return messages which are depicted as dashed arrows used to acknowledge the completion of an operation or the return of data to the caller after the message is processed .

Entry and exit actions in statechart diagrams specify the operations triggered when an object enters or exits a state, respectively. These actions are critical for understanding the dynamic behavior and lifecycle of an object because they define automatic responses to state changes. By detailing what an object should do upon entering or leaving states, designers can model complex life cycles accurately, as shown in an order lifecycle with states such as New, Processing, Shipped, Delivered, and Cancelled/Returned .

You might also like