0% found this document useful (0 votes)
88 views

Lab # 12 Introduction To UML Diagrams and Modeling Use Case Diagram

The document provides information on Unified Modeling Language (UML) and use case diagrams. It defines UML as a standardized modeling language used in software development to specify, visualize, and document systems. It discusses the 13 types of UML diagrams and focuses on use case diagrams. Use case diagrams model a system's functionality from an outside user (actor) perspective by showing actors, use cases as system functions, and relationships between them including include and extend. The document provides an example use case diagram for a vehicle sales system and guidance on identifying actors and use cases for developing use case diagrams.

Uploaded by

Laraib shahzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Lab # 12 Introduction To UML Diagrams and Modeling Use Case Diagram

The document provides information on Unified Modeling Language (UML) and use case diagrams. It defines UML as a standardized modeling language used in software development to specify, visualize, and document systems. It discusses the 13 types of UML diagrams and focuses on use case diagrams. Use case diagrams model a system's functionality from an outside user (actor) perspective by showing actors, use cases as system functions, and relationships between them including include and extend. The document provides an example use case diagram for a vehicle sales system and guidance on identifying actors and use cases for developing use case diagrams.

Uploaded by

Laraib shahzad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Lab # 12
Introduction to UML Diagrams

And Modeling Use Case Diagram

Objective
• Understanding Unified Modeling Language
• An Overview of Modeling Use Case Diagram
• Creating a Use Case Diagram

What is Unified Modeling Language (UML)?


UML short for Unified Modeling Language is a standardized modeling language consisting
of an integrated set of diagrams, developed to help system and software developers for
specifying, visualizing, constructing, and documenting the artifacts of software systems, as
well as for business modeling and other non-software systems. The UML represents a
collection of best engineering practices that have proven successful in the modeling of large
and complex systems. The UML is a very important part of developing object oriented
software and the software development process. The UML uses mostly graphical notations to
express the design of software projects. Using the UML helps project teams communicate,
explore potential designs, and validate the architectural design of the software.
The first thing to notice about the UML is that there are a lot of different diagrams (models)
to get used to. The reason for this is that it is possible to look at a system from many different
viewpoints. A software development will have many stakeholders playing a part.
For Example:
• Analysts
• Designers
• Coders
• Testers
• QA
• The Customer
• Technical Authors

All of these people are interested in different aspects of the system, and each of them require
a different level of detail. For example, a coder needs to understand the design of the system
and be able to convert the design to a low level code. By contrast, a technical writer is
interested in the behavior of the system as a whole, and needs to understand how the product
functions. The UML attempts to provide a language so expressive that all stakeholders can
benefit from at least one UML diagram.

Laraib Shahzad 2020f-bmcs-004 20


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

There are 13 total UML diagrams:


1. Use Case Diagram
2. Activity Diagram
3. State Machine Diagram
4. Sequence Diagram
5. Communication Diagram
6. Interaction Overview Diagram
7. Timing Diagram
8. Class Diagram
9. Component Diagram
10. Deployment Diagram
11. Object Diagram
12. Package Diagram
13. Composite Structure Diagram
14. Profile Diagram

What is a Use Case Diagram?


A use-case model describes a system's functional requirements in terms of use cases. It is a
model of the system's intended functionality (use cases) and its environment (actors). Use
cases enable you to relate what you need from a system to how the system delivers on those
needs.
Think of a use-case model as a menu, much like the menu you'd find in a restaurant. By
looking at the menu, you know what's available to you, the individual dishes as well as their
prices. You also know what kind of cuisine the restaurant serves: Italian, Mexican, Chinese,
and so on. By looking at the menu, you get an overall impression of the dining experience
that awaits you in that restaurant. The menu, in effect, "models" the restaurant's behavior.

Laraib Shahzad 2020f-bmcs-004 21


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Because it is a very powerful planning instrument, the use-case model is generally used in all
phases of the development cycle by all team members.

An Overview of Modeling Use Case Diagram


Use-case diagrams present a high-level view of system usage as viewed from an outsider's
(actor's) perspective.

These diagrams show the functionality of a system or a class and how the system interacts
with the outside world.

Use-case diagrams can be used during analysis to capture the system requirements and to
understand how the system should work.

During the design phase, use-case diagrams specify the behavior of the system as
implemented.

Symbols in use case diagram:

Notation Description Visual Representation

Actor
• Someone interacts with use case (system
function).
• Actor plays a role in the business
• Similar to the concept of user, but a user can
play different roles
• For example:
• A prof. can be instructor and also researcher
• plays 2 roles with two systems
• Actor has a responsibility toward the system
(inputs), and Actor has expectations from the
system (outputs).

Laraib Shahzad 2020f-bmcs-004 22


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Use Case
• System function (process - automated or
manual)
• Each Actor must be linked to a use case, while
some use cases may not be linked to actors.

Communication Link
• The participation of an actor in a use case is
shown by connecting an actor to a use case by
a solid link.
• Actors may be connected to use cases by
associations, indicating that the actor and the
use case communicate with one another using
messages.

Extends
• Indicates that an "Invalid Password" use case
may include (subject to specified in the
extension) the behavior specified by base use
case "Login Account".
• Depict with a directed arrow having a dotted
line. The tip of arrowhead points to the base
use case and the child use case is connected at
the base of the arrow.
• The stereotype "<<extends>>" identifies as an
extend relationship

Laraib Shahzad 2020f-bmcs-004 23


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Include
• When a use case is depicted as using the
functionality of another use case, the
relationship between the use cases is named as
include or uses relationship.
• A use case includes the functionality described
in another use case as a part of its business
process flow.
• A uses relationship from base use case to child
use case indicates that an instance of the base
use case will include the behavior as specified
in the child use case.
• An include relationship is depicted with a
directed arrow having a dotted line. The tip of
arrowhead points to the child use case and the
parent use case connected at the base of the
arrow.
• The stereotype "<<include>>" identifies the
relationship as an include relationship.

Boundary of system
• The system boundary is potentially the entire
system as defined in the requirements
document.
• For large and complex systems, each module
may be the system boundary.
• For example, for an ERP system for an
organization, each of the modules such as
personnel, payroll, accounting, etc.
• The entire system can span all of these
modules depicting the overall system
boundary

Laraib Shahzad 2020f-bmcs-004 24


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Use Case Diagram - Vehicle Sales Systems


The figure below shows a use case diagram example for a vehicle system. As you can see
even a system as big as a vehicle sales system contains not more than 10 use cases! That's the
beauty of use case modeling.
The use case model also shows the use of extend and include. Besides, there are associations
that connect between actors and use cases.

How to Identify Actor


Often, people find it easiest to start the requirements elicitation process by identifying the
actors. The following questions can help you identify the actors of your system (Schneider
and Winters - 1998):
• Who uses the system?
• Who installs the system?
• Who starts up the system?
• Who maintains the system?
• Who shuts down the system?
• What other systems use this system?
• Who gets information from this system?
• Who provides information to the system?
• Does anything happen automatically at a present time?

Laraib Shahzad 2020f-bmcs-004 25


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

How to Identify Use Cases?


Identifying the Use Cases, and then the scenario-based elicitation process carries on by asking
what externally visible, observable value that each actor desires. The following questions can
be asked to identify use cases, once your actors have been identified (Schneider and Winters
- 1998):
• What functions will the actor want from the system?
• Does the system store information? What actors will create, read, update or delete this
information?
• Does the system need to notify an actor about changes in the internal st ate?
• Are there any external events the system must know about? What actor informs the
system of those events?
• Use Case Diagram Tips
• Now, check the tips below to see how to apply use case effectively in your software
project.
• Always structure and organize the use case diagram from the perspective of actors.
• Use cases should start off simple and at the highest view possible. Only then can they
be refined and detailed further.
• Use case diagrams are based upon functionality and thus should focus on the "what"
and not the "how".

Laraib Shahzad 2020f-bmcs-004 26


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Exercise:
Q1: Draw a use case diagram of the stated scenario: A user has all the rights of login to a
catalog management website browse the catalog and view products. Similarly, the
administrator of that website has all the rights that a user has but in addition to that
administrator has other rights too that include Logout, create product, edit product and to
delete product. Find out the actors and relation of actor or actors to the use cases.

Note: Show the relevant association of actors with the use cases.

State the Actors and Use Cases of the above stated scenario and describe briefly the
dependencies between them.

Q2: At the start of each semester a student can request a prospectus containing a course
list. Information about a course is provided, such as the tutor, department and pre-requisites.
The new system will allow students to create a schedule, then select four courses. Each student
chooses two others in case their first choices become full or are cancelled. No course can have
more than 10 students. No course can have less than 3 students or it will be cancelled. This
will be the same functionality as available to other internal users of the system. When

Laraib Shahzad 2020f-bmcs-004 27


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

registration is complete, the registration system sends a message to the billing system to send
out a bill to the student.
Tutors use the system to find which classes they are teaching and who the students are. The
registrar will administer the system.
For a period at the beginning of the semester the student can change their schedule.
Students must be allowed to access the system during this time to add or delete courses.

Identify the Actors, Use Cases and Association of the given scenario.

Q3: For the hospital Management System, a general example is shown below.

The Actors and their use cases are identified as: -

Task 1: Receptionist--Interact with Visitors; Give appointments to Medical Representatives,


Revert to Phone Queries, Handles Patient Registration.

Laraib Shahzad 2020f-bmcs-004 28


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Task 2: Doctors--Give prescription to Patient, Do Operation, and Review Patients health.

Task 3: Nurse--Give Medicine to Patient, Coordinate with Doctors in Operation, Report to


doctors, Monitors Patients health.

Laraib Shahzad 2020f-bmcs-004 29


SOFTWARE DEVELOPMENT(MCS-203L) SSUET/QR/114

Task 4: Patient--Interact with Doctor, Follow Doctor Instructions, Pay Bills.

Task 5: Billing Section--Patient Billing, Discharge Billing, give salaries to Nurse, Staff and
Doctors, Maintain Tax Records.

Here for the Billing Section we have considered Patient Billing and Discharge billing
as separate, as the Patient might not be admitted and is charged for only counseling.
Draw the Use Case Diagram for the given scenario.

Laraib Shahzad 2020f-bmcs-004 30

You might also like