Department of Software Engineering
Faculty of Computer Science
Bialystok University of Technology
Software Engineering
Technical Laboratory - UML exercises
Use case diagram:
[Theoretical background]
Exercise A.
'Wigry' company engaged in charter (rental) boats for cruises on the lakes of Warmia and Mazury
in recent times has developed very dynamically. In order to exploit efficiently as possible
a growing base of boats, the company decided to invest in IT system supporting its core business.
The system is primarily include the management of reservations and rental boats, and among other
breaks associated with service of boats. Give the use case diagram of this system and describe
the 2-3 selected use cases.
[Proposition of solution]
Exercise B. T-Air is the passenger air transport company. In order to provide effective competition
from low cost airlines it has decided to build a computer system to assist its activities, in particular,
contacts with customers. The tasks of the system belong to the timetable management, reservations
and ticketing management, and making possible trip planning. Some operations, such as the purchase
of tickets available to customers via a web browser requires authentication (you must have an account),
others such as the search routes are available without restriction. In addition, the system is to provide
the directorate management information related to the effectiveness of the use of seats in the aircraft,
the level of sales, etc. Give a use case diagram of the system and describe selected use cases.
Class diagram:
[Theoretical background]
Exercise A. Compile a class model (only class names and attributes, and relationships between classes
with names and multiplicities of relationships) and note it as a class diagram. We design the system
of School Register. Each school class consists of no more than 25 students. One of the student in the class
is the headman of the class. The whole class learns the same subjects (within a specified time a week)
except foreign languages (some of the children learns English and some French). A teacher may teach
several subjects. Each class has a form-master. The student gets partial marks during a semester and
a final mark from each subject. In addition, the student gets a final mark of behaviour.
[Proposition of solution]
Exercise B. Compile a class model (only class names and attributes, and relationships between classes with names
and multiplicities of relationships) and note it as a class diagram. We design system supporting
the work of phonographic company dealing with the preparation of publications (CDs and cassettes)
with music by Polish artists and songs. Each piece of music has the author of music, and may have
the author of words. On a single album can be found up to 25 tracks. Albums are usually promoted
by one performer (the band, soloist, ...), but the company also publishes so-called medleys and multialbums
(usually 2-disc set). It is also possible a situation when the piece of music is performed by several
artists (such as a duet).
Activity diagram:
[Theoretical background]
Exercise A. An order for computer with software is realized in the company SPRINT as follows: In case of new
customers the sales department requires making prepayment, while in other cases, it at once fixes
the conditions of payment and transfer kit. In the hardware department there is collected and then assembled
the computer. At the same time, the software department completes the operating system and utilities requested
by the customer. After the transfer of hardware the whole software is installed, and the sales department issues
an invoice. For local clients (with seat located at a distance of 50 kilometers from the company) is sent the company
car with the ordered set and invoice, unless the client decided that he would receive his order in the company.
In other cases, the kit is sent via courier. Create the activity diagram.
[Proposition of solution]
Exercise B. Organization of tourist trip to Mars is realized as follows: A candidate for space tourist arrived to
Mars Travel company presents financial guarantees in the company's headquarters. In case of the candidate goes
the first time on a trip to the red planet, he is subjected to special medical examinations in preparation center.
Assuming that the above preconditions are met, after fixing the flight details (date of departure, length
of stay, ...) the contract is signed. At this point the company starts a direct preparation of the space shuttle
in the start center. At the same time in the preparation center the future cosmonaut improves his physical fitness
(especially swimming training and practicing yoga) and participates in language courses in order to know
the foundations of Mars language. At the end of the preparatory period traveler passes safety training
(e.g. on the space shuttle is not allowed smoking and using of mobile phones) and is transferred to
the runway center. Three days before the planned take-off is planned saying goodbye to relatives, if the client is
interested in it. The next day begins with the immediate preparation for take-off (fueling, tighten the screws,
inspection procedures and countdown). Start the space shuttle may be delayed in the event of technical problems or weather
or even canceled, if a potential astronaut give up. Create the activity diagram.
State diagram:
[Theoretical background]
Exercise A. We are designing system supporting the work of the library. Each bought copy of the book before
the making accessible by the borrowers is elaborated (number, securities, signs, ...). Rental period may be
extended only before the loan deadline, for a total duration not be longer than one year. Not returning the book in
time makes the necessary to pay the penalty for each day of the retention copy, the penalty shall be calculated
in time return the book. If the borrower loses the book, at the time of the report that a penalty fee will
be charged. The payment ends the life of the copy in the library. Lost books fall out of the pool made available
for loans. Each time when the book is given back by borrower a librarian checked its condition and if it detects
damage, puts a copy of the damaged books. If a repair of the copy by a bookbinder is impossible or unreasonable
then the copy is withdrawn. Design state diagram for the objects of class Copy.
[Proposition of solution]
Exercise B. Space tourist landing on Mars will automatically obtains a tourist visa for 3 months. During this time,
he can freely move around the red planet, admiring the beauty of the landscapes and satisfied its views may be at
any time to return to the Earth. The extension of stay on Mars is required to obtain another tourist visa, but
the total length of tourist stay may not exceed 6 months. Inhabitant of the Earth who illegally extends his stay
on Mars is treated as an illegal immigrant and liable to the forced deportation. It is also possible the permanent
residence on the planet, unless the person applies for refugee status, and proves that he was persecuted by individuals
of his specie on the Earth. The refugee, who spent 5 Mars years and does not come into conflict with the law, acquires
citizenship of Mars. The only exceptions are the refugees who marry native alien, since in this case automatically
becomes citizens of Mars. Back on Earth, however, is still possible, unless waiver the nationality of the Earth
has occurred. Provide a state diagram for objects of class NewcomerToEarthOnMars.
Sequence diagram:
[Theoretical background]
Exercise A. In the system supporting the management of urban courier company to choose how to carry a shipment is carried out
the simulation of time of carrying by different types of transport (bicycle, motorbike, car, truck). For this purpose,
an object of class Analyst wanting to known the best mean of transport, creates a temporary object of class Estimation
(that at the end of the estimation is removed). The time needed to transport a package depends on the size and distance
(for example, not every package can be transported by a bicycle, and the transport of a letter not need a truck).
Draw a sequence diagram for this situation.
Classes and methods for use:
[Proposition of solution]
TransportMeans
Number() – returns the number of transport means
GetMean(no) – returns the transport mean from the item of a specified number
TransportMean
IsTransportability(shipment) – is it possible to carry this shipment by this transport mean
CityPlan
Time(start, end, mean) – returns the time needed to reach the goal by defined mean
Estimation
Estimation(start, end, shipment) – constructor, calculates times for the various options
GetQuickest() – returns the fastest transport mean in this case
Exercise B. In a system supporting the work of the hotel room reservation is implemented as follows:
object of class Receptionist calls the method ShowEmptyRooms. It checks all the rooms in succession in terms
of their availability in given time limit. If the room is not booked in the ResultWindow (created during
the execution of a function) is put the proper information. After the Receptionist makes booking a room
and closes the ResultWindow. Draw a sequence diagram showing the described interaction.
Classes and methods for use:
Hotel
NumberOfRooms() – returns the number of rooms in the hotel
GetRoom(no) – returns the room from the item of a specified number
ResultWindow* ShowEmptyRooms(from_date, to_date) – displays in the temporary window
list of rooms available at the given time limit
Room
bool IsEmpty(from_date, to_date) – checks room availability within a certain period
ResultWindow
void AddInformation(room, from_date, to_date) – displays the following entry for a specific room
and period of its availability
void MakeReservation(entry_number) – make a reservation in accordance with information from the entry,
creating a new object of class Reservation
void Close() – destructor
Deployment diagram:
[Theoretical background]
Exercise A. In the system of settlement of water used by water supply company "Healthy Water" infrastructure is
as follows. Workstations (in the number 15) are connected to the server (Xeon 3400, 8GB RAM) through a local
area network (Ethernet), while the readings of counters are transferred from portable computers
(50 units) using GSM modems. On the server the following components are resided: BillingDB providing
interfaces IReading and IPayment and module (library) ConsumptionSettlement using IPayment. On 5 workstations
an application Settlements using both interfaces of BillingDB is installed, on the remaining workstations CostsSettlement
using interface IPayment is installed. Installed on portable computers the program Readings uses interface IReading.
Provide a deployment diagram implementing the above scheme.
[Proposition of solution]
Exercise B. In the system of billing for electricity used by the Department of Energy "Skylight" infrastructure
is as follows. Operating Server Opera (2 x Xeon 5500, 8 GB ECC DDR3) is connected to Database Server Bazaar
(Intel Core 2 Duo E6405z, 4GB RAM) through a local Ethernet network. To the server Opera 10 workstations
(Intel Core 2 Duo E6305, 2GB RAM) are connected also through the Ethernet network. Values of counters are sent by the controllers
with portable computers (100 units) to the Opera server through the public Internet. On the server Bazaar databases
SettlementsDB and AdminDB are located. Each database provides its own interfaces IRead and IWrite.
On the server Opera the application Administrator providing interface iAdmin and communicating
with AdminDB through its availabled interfaces and the application Settlements providing interface IStates
and using Administrator (iAdmin interface) and SettlementsDB (both interface) are installed. On all workstations
the application ConsumptionSettelment using the Settlements through IStates interface is installed, on two workstations
ServiceAdministratio application using Administrator through interface iAdmin is additional instaled.
On portable computers software Counters using IStates are placed. Provide a deployment diagram implementing the above scheme.
Technical Laboratory - Projects
Topics proposal
Content of documentation
Requiments:
- textual description of requirements
- use case diagram and description of actors and use cases
- prototype of user interface
- activity diagrams
Architecture:
- class diagram
- sequence diagrams
- state diagrams
Phisical model:
- deployment diagram
Copyright © 2010-2011 Marek Krętowski, Tomasz Łukaszuk, Marek Grześ, Krzysztof Jurczuk.
Revised: 2011-11-23