Lab # 12 Introduction To UML Diagrams and Modeling Use Case Diagram
Lab # 12 Introduction To UML Diagrams and Modeling Use Case Diagram
Lab # 12
Introduction to UML Diagrams
Objective
• Understanding Unified Modeling Language
• An Overview of Modeling Use Case Diagram
• Creating a Use Case Diagram
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.
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.
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.
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).
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
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
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
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.
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.