UML LAB - Exp 1
UML LAB - Exp 1
1. Things
Structural things define the static part of the model. They represent the physical and conceptual
elements. Following are the brief descriptions of the structural things.
1. Class − Class represents a set of objects having similar responsibilities.
4. Use case −Use case represents a set of actions performed by a system for a specific goal.
6. Node − A node can be defined as a physical element that exists at run time.
2. State machine − State machine is useful when the state of an object in its life cycle is
important. It defines the sequence of states an object goes through in response to events.
Events are external factors responsible for state change
Grouping things can be defined as a mechanism to group elements of a UML model together.
1. Package − Package is the only one grouping thing available for gathering structural and
behavioral things.
2 Relationships
Relationship is another most important building block of UML. It shows how the elements are
associated with each other and this association describes the functionality of an application.
1. Dependency is a relationship between two things in which change in one element
also affects the other.
2. Association is basically a set of links that connects the elements of a UML model. It
also describes how many objects are taking part in that relationship.
Structural Diagrams represent the static aspect of the system. These static aspects represent
those parts of a diagram, which forms the main structure and are therefore stable.
4. Deployment diagrams are a set of nodes and their relationships. These nodes are
physical entities where the components are deployed.
Behavioral Diagrams basically capture the dynamic aspect of a system. Dynamic aspect can
be further described as the changing/moving parts of a system.
5. Use case Diagrams are a set of use cases, actors, and their relationships. They represent
the use case view of a system.
6. Sequence diagram deals with some sequences, which are the sequence of messages flowing
from one object to another.
7. Collaboration diagram represents the structural organization of a system and the
messages sent/received. Structural organization consists of objects and links.
8. State-chart Diagram describes the state change of a class, interface, etc. State chart diagram
is used to visualize the reaction of a system by internal/external factors.
9. Activity diagram describes the flow of control in a system. It consists of activities and links.
Case Studies
Problem Statements
1. Library Management System
It is a support system for a library.
The library lends books and magazines to borrowers, who are registered in the system,
as are the books and magazines.
The library handles the purchase of new titles for the library. Popular titles are bought
in multiple copies. Old books and magazines are removed when they are out of date or
in poor condition.
The librarian is an employee of the library who interacts with the customers
(borrowers) and whose work is supported by the system.
A borrower can reserve a book or magazine that is not currently available in the library,
so that when it’s returned or purchased by the library, that borrower is notified. The
reservation is canceled when the borrower checks out the book or magazine or through
an explicit canceling procedure.
The librarian can easily create, update, and delete information about the titles,
borrowers, loans, and reservations in the system.
The system can run on all popular Web browser platforms (Internet Explorer 5.1+,
Netscape 4.0+, and so on).
The system is easy to extend with new functionality.
2. Point-Of-Sale Terminal
POS system is a computerized application used to record sales and handle payments; it is
typically used in a retail store. It includes hardware components such as a computer and
bar code scanner, and software to run the system.
It interfaces to various service applications, such as a third-party tax calculator and
inventory control. These systems must be relatively fault-tolerant; that is, even if remote
services are temporarily unavailable, they must still be capable of capturing sales and
handling at least cash payments.
POS system increasingly must support multiple and varied client-side terminals and
interfaces. These include a thin-client Web browser terminal, a regular personal computer
with something like a Java Swing graphical user interface, touch screen input, wireless
PDAs, and so forth.
Furthermore, we are creating a commercial POS system that we will sell to
different clients with disparate needs in terms of business rule processing.
Each client will desire a unique set of logic to execute at certain predictable points in
scenarios of using the system, such as when a new sale is initiated or when a new
line item is added. Therefore, we need a mechanism to provide this flexibility and
customization.
1. Familiarization with Rational Rose
Rational Rose is an object-oriented Unified Modeling Language (UML) software design
tool intended for visual modeling and component construction of enterprise-level software
applications. Two popular features of Rational Rose are its ability to provide iterative
development and round-trip engineering.
1. Browser
Browser contains a list of all the modeling elements in the current model. It contains a tree
view of all the elements in the current Rose model. This presents a hierarchical view of the
analysis and design model, including all the diagrams and all the individual elements that make
up a diagram.
2. Documentation Window
Documentation Window may be used to create, review, and modify any selected
modeling element. If nothing is selected, the window displays the string “No selection”. The
contents of the Documentation Window will change as different modeling elements are
selected. To add documentation, right click on the element, select specification, and fill in the
documentation field. The documentation will then be shown in the documentation window each
time the mouse is clicked on the element.
3. Diagram Windows
Diagram windows allow creating and modifying graphical views of the current model. Each
icon on a diagram represents a modeling element. This is the place where the diagram is actually
created.
4. Drawing Tools
This tool presents a set of icons that indicate the different elements that can be added to a
diagram. The elements that can be used will change, depending on the type of diagram
being created. Different diagram types have different sets of icons.
There are four views for a model created in Rational Rose, each representing the system
from a different point of view.