Professional Documents
Culture Documents
System Modeling SE
System Modeling SE
System Modeling SE
Five types of UML diagrams that are the most useful for system modeling:
Models of both new and existing system are used during requirements engineering. Models of
the existing systems help clarify what the existing system does and can be used as a basis for
discussing its strengths and weaknesses. These then lead to requirements for the new system.
Models of the new system are used during requirements engineering to help explain the
proposed requirements to other system stakeholders. Engineers use these models to discuss
design proposals and to document the system for implementation.
https://www.edrawmax.com/context-diagram/
• Each Actor must be linked to a use case, while some use cases may not be linked to
actors.
How to Create a Use Case Diagram
1. Identifying Actors
Actors are external entities that interact with your system. It can be a person, another system
or an organization. In a banking system, the most obvious actor is the customer. Other actors
can be bank employee or cashier depending on the role you’re trying to show in the use case.
An example of an external organization can be the tax authority or the central bank. The loan
processor is a good example of an external system associated as an actor.
One of the best examples of this is “Make Payment” use case in a payment system. You can
further generalize it to “Pay by Credit Card”, “Pay by Cash”, “Pay by Check” etc. All of them
have the attributes and the functionality of payment with special scenarios unique to them
Include relationships - One use case (base) includes the functionality of another (inclusion case)
• Supports re-use of functionality
• The standard UC includes the mandatory UC (use the verb to figure direction arrow).
• Standard use case can NOT execute without the include case ->tight coupling .
Extend relationships - One use case (extension) extends the behavior of another (base)
• Extend relationship – linking an optional use case to a standard use case. Extend relationship
Standard use case can execute without the extend case -> loose coupling
Generalization example
EX2.
EX:3
The Pizza Ordering System
The Pizza Ordering System allows the user of a web browser to order pizza for home delivery.
To place an order, a shopper searches to find items to purchase, adds items one at a time to a
shopping cart, and possibly searches again for more items. When all items have been chosen,
the shopper provides a delivery address. If not paying with cash, the shopper also provides
credit card information. The system has an option for shoppers to register with the pizza shop.
They can then save their name and address information, so that they do not have to enter this
information every time that they place an order. Develop a use case diagram, for a use case for
placing an order, PlaceOrder. The use case should show a relationship to two previously
specified use cases, IdentifyCustomer, which allows a user to register and log in, and
PaybyCredit, which models credit card payments.
Class Diagram
Class diagrams are the main building block in object-oriented modeling. They are used to show
the different objects in a system, their attributes, their operations and the relationships among
them.
. For example, in an airline reservation system there would be classes such as Flight, Passenger
and Airport.
The main symbols shown on class diagrams are:
■ Classes, which represent the types of data themselves.
■ Associations, which show how instances of classes reference instances of other classes.
■ Attributes, which are simple data found in instances.
■ Operations, which represent the functions performed by the instances.
■ Generalizations, which are used to arrange classes into inheritance hierarchies.
A multiplicity of 1 indicates that there must be exactly one instance linked to each
object at the other end of the association. For example, there can only be one Company
associated with each Employee
A very common multiplicity is ∗, which is normally read as ‘many’, and means any
integer greater than or equal to zero. For example, many employees can be associated
with a company; one possibility being that a company has no employees. Although
there is no theoretical upper bound, there is a practical upper bound that depends on
the amount of memory and processing capacity available.
If there can be either zero or one object linked to an object at the other end of the
association, then the multiplicity is said to be ‘optional’, and the notation 0..1 is used.
So, for example, Figure 5.2 shows that there can be zero or one office per employee. In
other words, it is optional that an employee is assigned to an office (some may work at
home or in a job that does not require an office).
You can also specify the multiplicity to be an interval, which is shown as two dots
between the lower and upper bound. An interval is also sometimes called a range. If, for
example, you determine that a sailboat can have between 1 and 3 masts, then you
would write 1..3 on the Mast end of the association. The 0..1 notation discussed above
is a special case of an interval. If an interval has no upper bound, then you use the
asterisk; therefore 0..∗ and ∗ mean the same thing, while 1..∗ means ‘at
least one’.
Labeling associations
An association name should be a verb or verb phrase, and is placed next to the middle
of the association. One class becomes the subject and the other class becomes the
object of the verb.
The association between Employee and Company is called worksFor. You can read the
association in one direction as, ‘an employee works for a company’.
Another way of labeling an association is to use a role name. Role names can be
attached to either or both ends of an association. A role name acts, in the context of the
association, as an alternative name for the class to which it is attached. For example, in
the association between Person and BoardOfDirectors, boardMember is a role name
that describes the people who happen to be members of the board. You can read this
association as, ‘a board of directors has either zero or 3 to 8 persons as board
members’.
For example, in the association between Company and BoardOfDirectors, we have
chosen not to add any label; the association would read, ‘a company has a board of
directors’
We can tell that for each Booking there must always be exactly one Passenger, but each
Passenger can have any number of Bookings (i.e. on different flights and dates). Similarly, for
each Booking there must always be exactly one SpecificFlight, but each SpecificFlight can have
any number of Bookings (up to the capacity of the aircraft, of course).
Reflexive associations
Reflexive Association
This occurs when a class may have multiple functions or responsibilities. For
example, a staff member working in an airport may be a pilot, aviation
engineer, a ticket dispatcher, a guard, or a maintenance crew member. If the
maintenance crew member is managed by the aviation engineer there could
be a managed by relationship in two instances of the same class.
Sequence Diagram and Communication Diagram
In the case of synchronous messages, the sender waits until it has received a response
Message before continuing.Theresponse message is represented by a dashed line with an open
arrowhead. If the content of the response message and the point at which the response
message is sent and received are clear from the context, then the response message may be
omitted in the diagram. In asynchronous communication, the sender continues after having
sent the message
Figure 8.1
You represent a message using an arrow, labeled with the message name and
optional arguments. You specify the order in which messages are sent by prefixing
each message using some numbering scheme.
Figure 8.4
The actor initiates the interaction via the user interface; the user interface sends a
requestToRegister message to the CourseSection, which in turn creates a Registration. The
Registration object then asks the Student to add it to the list of courses the student is taking,
and also asks the CourseSection to add it to the list of registered students.
Ex: Before drawing the sequence diagram, it’s necessary to identify the objects or actors that
would be involved in creating a new user account. These would be;
Librarian
Online Library Management system
User credentials database
Email system
Here are the steps that occur in the use case named ‘Create New Library User Account’.
The librarian request the system to create a new online library account
The librarian then selects the library user account type
The librarian enters the user’s details
The user’s details are checked using the user Credentials Database
The new library user account is created
A summary of the of the new account’s details are then emailed to the user
From each of these steps, you can easily specify what messages should be exchanged between
the objects in the sequence diagram. Once it’s clear, you can go ahead and start drawing the
sequence diagram.
EX 2:
Sequence diagram based on the class diagram
Activity Diagram
The registrar determines that the forms have been filled out properly.
The registrar informs student to attend in university overview presentation.
The registrar asks the student to pay for the initial tuition.