0% found this document useful (0 votes)
7 views10 pages

Use Case Diagrams for Various Apps

The document outlines various use case diagrams for different applications, including Hungry Harry's App, Library Management System, and Online Shopping Platform, among others. Each use case includes actors, relationships, and specific functionalities, highlighting the use of <<include>> and <<extend>> relationships for modularity. The document serves as a guide for understanding how to structure use cases in software engineering.

Uploaded by

tasliazaman81
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)
7 views10 pages

Use Case Diagrams for Various Apps

The document outlines various use case diagrams for different applications, including Hungry Harry's App, Library Management System, and Online Shopping Platform, among others. Each use case includes actors, relationships, and specific functionalities, highlighting the use of <<include>> and <<extend>> relationships for modularity. The document serves as a guide for understanding how to structure use cases in software engineering.

Uploaded by

tasliazaman81
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

Md Adnan Arefeen, PhD

Email: [Link]@[Link]
Course: CSE 327 - Software Engineering

Use Case Diagram: Hungry Harry’s App


Story
Harry wants to order lunch from an app. He logs in, browses through menus, selects food, applies a
discount coupon if he has one, and makes a payment. After ordering, he can track the delivery or cancel
if it’s delayed. The delivery person needs to log in to see assigned orders.

Actors
• Customer (Harry)
• Delivery Person

Use Cases and Relationships


• Customer can: Login, Browse Menu, Place Order, Track Delivery, Cancel Order
• Delivery Person can: Login, View Assigned Orders
• Place Order <<include>> Make Payment
• Place Order <<extend>> Apply Discount

UML Use Case Diagram

Login

Customer
Browse Menu

Apply Discount
≪extend≫
Place Order
≪include≫
Make Payment

Track Delivery

Cancel Order

View Assigned Orders

Login (DP)
Delivery Person

1
In a UML Use Case Diagram, <<include>> and <<extend>> represent specific relationships be-
tween use cases that allow modularity and reusability.

<<include>> Relationship
Definition
The <<include>> relationship is used when a use case always requires another use case to
execute as part of its flow. This is a mandatory inclusion.

Example in Hungry Harry’s App


• Base Use Case: Place Order
• Included Use Case: Make Payment
• Explanation: Whenever a customer places an order, the system must take them through the pay-
ment process. So, Place Order <<include>>Make Payment.

<<extend>> Relationship
Definition
The <<extend>> relationship is used when a use case optionally adds behavior to another use
case, only under specific conditions.

Example in Hungry Harry’s App


• Base Use Case: Place Order
• Extending Use Case: Apply Discount
• Explanation: The system checks whether a discount is available. If so, it allows the customer to
apply it. This step is not mandatory. So, Apply Discount <<extend>>Place Order.

Summary Table

Relationship Direction Meaning Example


<<include>> A→B A always uses B Place Order → Make Payment
<<extend>> B→A B optionally extends A Apply Discount → Place Order

Use Case 1: Library Management System


Story
Sarah, a university student, logs into the library portal to search for books. She can reserve books
or request an interlibrary loan if the book isn’t available. Making a reservation always includes checking
availability. Renewing a book is possible only if no one else has placed a hold on it.

Actors
• Student
• Librarian

2
Use Cases and Relationships
• Student: Login, Search Book, Reserve Book, Request Interlibrary Loan, Renew Book

• Reserve Book <<include>> Check Availability

• Renew Book <<extend>> Check Hold Status

UML Use Case Diagram

Login

Student
Search Book

Reserve Book

≪include≫

Check Availability

Request Interlibrary Loan

Renew Book

Librarian

≪extend≫

Check Hold Status

3
Use Case 2: Online Shopping Platform
Story
Jake logs into an e-commerce website to buy clothes. He browses the catalog, adds items to his cart,
and places an order. Placing an order always includes selecting a shipping address and making a payment.
Applying a promo code is optional.

Actors
• Customer

Use Cases and Relationships


• Customer: Login, Browse Catalog, Add to Cart, Place Order

• Place Order <<include>> Select Shipping Address, Make Payment

• Place Order <<extend>> Apply Promo Code

UML Use Case Diagram

Login

Browse Catalog Apply Promo Code

Customer
Add to Cart ≪extend≫

Select Shipping Address


≪include≫
Place Order
≪include≫
Make Payment

4
Use Case 3: Hospital Appointment System
Story
Emma visits a hospital website to book an appointment. She logs in, chooses a department, and books
an appointment. Booking includes choosing a doctor and time. She can optionally upload previous reports.

Actors
• Patient

• Receptionist

Use Cases and Relationships


• Patient: Login, Choose Department, Book Appointment

• Book Appointment <<include>> Choose Doctor, Select Time

• Book Appointment <<extend>> Upload Reports

UML Use Case Diagram

Login

Choose Department

Patient
Book Appointment ≪extend≫ Upload Reports
≪include≫
Choose Doctor
≪include≫

Select Time

Receptionist

5
Use Case 4: Ride-Sharing App
Story
Tom opens a ride-sharing app to book a ride. He logs in, sets a destination, and confirms the ride.
Confirming includes fare estimation and driver assignment. He can extend the trip mid-ride or cancel the
ride if the driver is late.

Actors
• Rider

• Driver

Use Cases and Relationships


• Rider: Login, Set Destination, Confirm Ride, Cancel Ride

• Confirm Ride <<include>> Fare Estimation, Driver Assignment

• Confirm Ride <<extend>> Extend Trip

UML Use Case Diagram

Login

Set Destination Extend Trip

≪extend≫ Fare Estimation


≪include≫
Rider
Confirm Ride
≪include≫
Driver Assignment

Cancel Ride

Driver

6
Use Case 5: University Course Registration
Story
Alice logs into the university portal to register for courses. She views available courses, adds selected
courses to her plan, and finalizes registration. Finalizing registration includes fee payment and schedule
conflict check. She can optionally request course override if needed.

Actors
• Student

• Registrar

Use Cases and Relationships


• Student: Login, View Courses, Add to Plan, Finalize Registration

• Finalize Registration <<include>> Fee Payment, Schedule Conflict Check

• Finalize Registration <<extend>> Request Course Override

UML Use Case Diagram

Login

View Courses

Student
Add to Plan

Finalize Registration ≪include≫ Fee Payment

≪extend≫ ≪include≫
Registrar
Request Course Override Schedule Conflict Check

7
Use Case 6: Food Delivery Service
Story
Linda opens a food delivery app and logs in. She searches restaurants, adds food to her cart, and places
an order. Placing an order includes making a payment and selecting delivery address. She can optionally
schedule the delivery for later.

Actors
• Customer

• Delivery Person

Use Cases and Relationships


• Customer: Login, Search Restaurants, Add to Cart, Place Order

• Place Order <<include>> Make Payment, Select Delivery Address

• Place Order <<extend>> Schedule Delivery

UML Use Case Diagram

Login

Customer

Search Restaurants

Add to Cart Schedule Delivery

≪extend≫

Place Order ≪include≫ Make Payment

≪include≫
Delivery Person

Select Delivery Address

8
Use Case 7: Banking System
Story
John logs into his online banking account. He can view balance, transfer money, or pay bills. Trans-
ferring money always includes authentication. Paying bills can optionally include scheduling recurring
payments.

Actors
• Customer

• Bank Teller

Use Cases and Relationships


• Customer: Login, View Balance, Transfer Money, Pay Bills

• Transfer Money <<include>> Authenticate User

• Pay Bills <<extend>> Schedule Recurring Payment

UML Use Case Diagram

Login

Customer Bank Teller

View Balance

Transfer Money

≪include≫

Authenticate User

Pay Bills

≪extend≫

Schedule Recurring Payment

9
Use Case 8: Hotel Booking System
Story
Rachel browses hotels online. She logs in, searches for hotels by date and location, and books a room.
Booking includes selecting room type and payment. She can optionally request special amenities.

Actors
• Guest

• Hotel Staff

Use Cases and Relationships


• Guest: Login, Search Hotels, Book Room

• Book Room <<include>> Select Room Type, Make Payment

• Book Room <<extend>> Request Amenities

Login

Guest HotelStaff

Search Hotels

Select Room
≪include≫
Book Room
≪include≫
Make Payment
≪extend≫

Request Amenities

10

Common questions

Powered by AI

By mandating specific operations across similar use cases in different systems, the 'include' relationship ensures that foundational processes are consistently executed, fostering uniformity in user experience and operational logic. For instance, mandatory actions like 'Make Payment' in the ordering process for both Hungry Harry’s App and Food Delivery Service ensure consistent backend processing and user steps .

The 'include' relationship helps modularize and reuse commonly required functionalities across multiple use cases, ensuring consistency and reducing redundancy. For example, 'Make Payment' is an included use case in both the Hungry Harry’s App and the Food Delivery Service, as these are indispensable steps in their order processes . This modular approach simplifies maintenance and enhances clarity in system design.

Implementing the 'extend' relationship in complex use cases can introduce challenges such as increased system complexity, and potential for overlooking extended functionality during system testing. If conditions activating these extensions are not clearly defined or managed, there may be a risk of inconsistent user experiences. Mismanagement can lead to complicated system maintenance and debugging processes .

Both use cases feature mandatory actions included in the primary operations. In the Online Shopping Platform, 'Place Order' includes 'Select Shipping Address' and 'Make Payment'; similarly, the Banking System's 'Transfer Money' includes 'Authenticate User.' Each is critical for ensuring completeness of the respective processes, emphasizing security and verification in both systems .

In the Hungry Harry’s App, the 'Place Order' use case includes 'Make Payment' as a mandatory action, and optionally extends to 'Apply Discount' if a discount is available . Similarly, in the Food Delivery Service, 'Place Order' includes both 'Make Payment' and 'Select Delivery Address,' which are essential actions for order completion, and extends to 'Schedule Delivery' if the user opts to set a delivery time in the future .

The 'extend' relationship enhances flexibility by allowing additional, conditional functionalities to be invoked in a use case. For instance, in the Hospital Appointment System, the 'Book Appointment' use case is extended by 'Upload Reports,' permitting users to add medical reports optionally . This design approach provides flexibility, enabling customized workflows without altering the primary use case structure.

In a UML Use Case Diagram, the 'include' relationship is used when a use case requires another use case as a part of its flow, thus making it mandatory. For example, in the Hungry Harry’s App, the 'Place Order' use case includes 'Make Payment' since every order must include a payment. Meanwhile, the 'extend' relationship adds optional behavior to a base use case, triggered under specific conditions. In the same app, 'Apply Discount' extends 'Place Order,' allowing for a discount to be optionally applied if available .

Removing the 'include' relationships for 'Select Shipping Address' and 'Make Payment' from the 'Place Order' use case in the Online Shopping Platform would lead to incomplete order processing, as these steps are integral to completing an order. Without them, the system would lack necessary actions for order fulfillment, resulting in a dysfunctional shopping experience .

User roles define specific functionalities and interactions within use case diagrams. In the University Course Registration system, the 'Student' actor has access to actions like 'Login' and 'Finalize Registration,' which include other mandatory processes like 'Fee Payment.' The design also considers user-specific roles such as the 'Registrar,' typically involved in overseeing the registration process, potentially impacting how override requests are managed through the 'extend' relationship .

In the Ride-Sharing App, the 'extend' relationship in 'Confirm Ride' allows the ride to be extended mid-ride if necessary . This feature enhances the user experience by offering flexibility to accommodate changes in the user’s plans without needing to cancel and restart the ride booking process.

You might also like