You are on page 1of 3

HND in Information Technology

Application Development

Class Diagrams - Assignment

Draw class diagrams for the following scenarios.

Question 1

i. Hotel room, booking, guest


ii. Ii. Club member, adult member, junior member
iii. Iii. Exam paper, instruction, question, solution
iv. Animal, mammal, bird, reptile, dog, horse, parrot
v. Sentence, word, letter, punctuation
vi. Academic staff, Lecturer, professor, student.
vii. Laptop, Desktop Computer, Display Unit, Keyboard, DVD Drive, DVD,
viii. Multimedia projector
ix. Invoice, Customer, Item, Super Market, Grocery Shop, Supplier
x. Savings Account, Current Account, Loan, Customer, Loan Officer
xi. Subject, Lecture, Tutorial, Lab, Examination, Lecturer, Student

Question 2

A football club has two grounds. Each ground consists of two or three pitches and a clubhouse.
The football club has lots of members. A member may be a playing member or a social member,
and a playing member may be an adult member or a junior member. A playing member may be
chosen to play for one or more teams, and each team has 11 playing members. Each team plays a
number of fixtures.

Question 3

San Diego zoo is housing over 700 animals of more than 150 species and subspecies. The
management is in need of developing a system to manage their operations.

The expected system should record, maintain and manage information related to all animals in this
zoo. The zoo provides home for many kinds of species according to their territory. Animals are
placed in different locations considering their behaviors and lifestyles. Marine animals live in
water and they are placed in tanks. Terrestrial animals (who live on land) are placed in cages (e.g.:
Lion, bear etc.) or open areas (e.g.: Panda, monkey etc.). Reptiles are always placed inside sealed
glass cages. Each location has a unique number assigned to it. The size of the location varies
according to the type and number of animals allocated to that location.

Zoo keeper is the head of the zoo and he is responsible to manage the zoo. Zoo keeper can search
and view any animal or location details when he wants. Operational staff helps zoo keeper to
manage the day to day activities in the zoo. Each operational staff member is allocated to a
particular location and he is responsible for the well-being of the animals placed in those locations.
When operational staff need to go into a particular location they need to swipe their ID card at the
entry gate of every location. Operational staff visits each location assigned to them daily, and
update daily log with relevant animal details.

When an animal is sick, one of the in house veterinary surgeon is call doctor to examine the animal.
The particular surgeon who diagnose the animal, needs to update a separate health record for each
animal. Some veterinary surgeons conduct research while others only handle health issues of
animals. Selected set of animals are taken for research purposes. At the end of a research a research
report is prepared. A research report should always consist of sections on animal history, clinic
plan, results and conclusion. These sections should be maintained separately because they need to
be accessed and updated when the research is ongoing and it is useful for future references as well.

Question 4

The functional requirements for an automated supermarket system include the need to support
searching, buying and maintaining of items. There are three types of buyer; staff members who
have a staff identity card, loyal members who have a valid loyalty card and guests. If the buyer is
a staff member or a loyal member, the respective card will be validated at the time of buying an
item and special rates will be applied to them.

The items to be sold in the supermarket are stored in an organized manner. The items stored in the
front racks are considered as eye-catching items. To be stored in these premium racks, the item
owners should pay an extra payment in addition to the general payment. The other items are stored
category wise, for example, grocery items in one rack and snack items in another. The food items
such as meat, ice cream and frozen foods are stored in deep freezers or refrigerators.

Each of these store locations has a unique number which is used to identify and keep track of the
item storage. An online buyer can search items by name, brand or category. The search will result
in showing the details of each matching item such as price, storage location, brand a td other
details. The buyers can add these items to their shopping cart if they wish to buy them. The item
owners sometimes name a collection of their items a "Promotion Package". At the time of buying,
if a buyer selects items of these Promotion Packages, a special price will be applied for these items.
Assuming that you are going to develop the automated supermarket e-commerce system with the
above mentioned requirements, draw the class diagram. Identify the classes with main attributes,
methods and show inter relationships with association names.

Question 5

“Arogya” is a hospital which caters thousands of patients. The hospital is going to use a patient
management system to help in registering information about patients. The requirements gathered
for the system are as follows.

When a patient contact “Arogya” hospital, they want to know whether the patient wants to be
admitted or to consult a doctor. To consult a doctor, a patient takes an appointment. If a patient is
in a critical stage, the doctor gives a recommendation to the hospital for the patient to be admitted.
When admitting a patient, the hospital registers him/her to a ward. A ward can have a maximum
of six beds for patients. In addition to wards, the hospital has a "Royal Suite" where individual
rooms can be allocated to each patient. These rooms have all the facilities including a separate
bathroom, a lounge, a fridge and a television.

The patients who want to be admitted into rooms in "Royal Suite" are registered through "Royal
Registration" scheme where they will be assigned a room for an individual. Registering through
"Royal Registration" is applicable only for patients who are covered under a hospital insurance
exceeding a certain limit.

Regardless of being admitted or not, a patient may undergo several test operations at the hospital.
Reports will be generated for these test operations. All the patients are given a unique number from
the hospital which will be referenced in all their documents related to the hospital.

1.1. Assuming that you are going to develop the patient management system for “Arogya”
hospital, draw the class diagram using UML notation. Identify the relationships between
classes with multiplicities, attributes and association names.
1.2. In the “Arogya” hospital, a patient can be treated by a "Consultant Doctor" or a "Junior
Doctor". A "Consultant Doctor" is a senior doctor who has completed all of his or her
specialist training. Show a method that you can represent this information in the class
diagram. (You do not have to redraw the complete class diagram.)

You might also like