Oosd Lab Solutions For Practicals

Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

1.

Draw Use case Diagram & Activity diagram with swim lane for the front office
system in a 5- star hotel described below.
Front office of any hotel is responsible for all room reservations, room allocations and
final settlement of bills. Any company or person can reserve rooms for their future stay.
They have to indicate from what date to what date they need the room. They also have
to indicate how many rooms are required. Sometimes the reservations could be
cancelled or dates or number of rooms changed. For reservation, cancellation or
modification of rooms, customer receives an acknowledgement from the hotel.

CLASS DIAGRAM

1
USECASE DIAGRAM

2
SEQUENCE DIAGRAM FOR RESERVE ROOM SCENARIO

: (CUSTOMER) : (FRONTOFFICE) : (ROOM)


enquire for rooms

display rooms inf

reserve room
check for status

reject the request

store inf in server

allocate room and sends

request for change of

request confirmed and


ackn send

3
2)
A major distributor of office supplies has a set of criteria for preparing bills. When the
customer places the order one of the sales staff prepares the order and writes the bill, if
there is an insufficient quantity of items on hand, the back order is set up for missing
items. The available items are shipped and bill is prepared. The cost is billed for the back
order items when they are shipped. Wholesale customers are eligible for discount if they
purchase minimum of 100 items. Retail customers are not eligible for any discounts
irrespective of the number of items ordered. All retail customers pay sales tax, wholesale
customers don’t pay any tax provided they have state tax exemption. All bills are mailed
to customers. Draw use case diagram and also draw sequence diagram for one of the
scenario

CLASS DIAGRAM

4
SEQUENCE DIAGRAM FOR ORDER FULFILLMENT

: distributor : Salesstaff : Customer

appoints
assigns duty to

place order

checks type

inf forwarded
ship order
send bill

send ack regarding shipment received

pays the bill

send ack regarding payment received

updates inf to distributor

5
USE CASE DIAGRAM

PrepareOrder

distributor
prepares bill

customer

BackOrder

ShipItems

wholesalecust
salesofficer retail cust

paybill in case of no tax exemption


(if pur_qty<100)

pay tax
avail discount

6
3)A century system is the statistics provider organization of all the first class cricket matches
conducted across the world round the year. They compile all the statistics of the players in
terms of matches played, venues, country, match type (test/one-day). For each match,
statistics is compiled for each player i.e., runs scored in each innings, wickets and catchers
taken, run outs, number of fours and sixes hit etc., The Company wants to develop a
computer application to compile these statistics

CLASS DIAGRAM

7
USECASE DIAGRAM

prepare matchstats
Player

statistician
prepareplayerstats

Match

TestMatch Oneday

8
4)SAM’s Couriers Limited intends to computerize the recruitment process. The
advertisements for a particular post appear on their website. The candidates are called for
interview based on the eligibility criteria which varies from post to post. Information
regarding the eligibility and vacancies is maintained in a database. The candidate is selected
based on written test and interview. Once selected, the candidate is under probation for one
year. In this period the candidate is not eligible for any special leaves and benefits. After
completion of the probation period the manager evaluates the candidate’s performance and
will be given an appointment letter with a unique employee id. Draw use case diagram for the
given scenario. Also draw the sequence diagram for one of the scenarios.

CLASS DIAGRAM

9
USE CASE DIAGRAM

<<provides inf for>>

display adds
SAM COUR
DATABASE
SAM COURIER

display jobs display eligibility criteria

Candidate
conducts eligibility test
after selection

evaluate employee

EMPLOYEE MANAGER

give app letter and emp id

Temporary Permanant

10
SEQUENCE DIAGRAM FOR SAM COURIERS ONLINE RECRUITMENT SYSTEM

: Candidate : SAM : Manager SAM


COURIERS DATABASE
go through adds

makes online req

checks eligibility criteria

appointed/rejected informed
assigns manager

monitors
evaluates after 6 months

give appointment letter,unique id

INF STORED IN

11
5)In a Business school, once a student is admitted, he/she will be assigned a counsellor. The
student has to report to the counsellor & fill his/her personal details in the counselling file.
Student’s queries/problems are addressed by the counsellor, which is also recorded in the
counselling files. The Principal of the school monitors the process of counselling i.e. the
problems reported by the student and actions taken by the counsellor. As the strength of the
school has increased, it is not possible for the principal to monitor the counselling process
manually. Draw the use case diagram and activity diagram with swim lanes.

CLASS DIAGRAM

12
USECASE DIAGRAM

<<includes>>

Takes admissions counselling process

School <<includes>>
Principal

<<includes>>
Assign Counsellor

<<includes>>

monitors

Student fill personal inf

find out student queries

Store inf in Counselling file


Counsellingfile

Counsellor

13
SEQUENCE DIAGRAM

: School : Student : Counsellor : Counselling : Principal


file
takes admission
assigned to

Reports to

fill personnal inf in

Listen queries of students

Student gives response

store problems and solutions

Monitors

14
COLLABORATION DIAGRAM

:
1: takes admission Student

: School 3: Reports to
6: Student gives response

2: assigned to
5: Listen queries of students
4: fill personnal inf in

: Counsellor

: Counselling 7: store problems and solutions


file

8: Monitors
:
Principal

15
6)OTOS’s pharmacy is the distributor of various pharmaceuticals products. They have a
huge network of customers. The registered customers can only book
orders for the specified product. If the specified product s available the required quantity
is checked against the quantity on hand (QOH). If the required quantity is less than QOH
a deliver challan is prepared. After the delivery of the product an Invoice is prepared by
accountant which contains the cost of ordered items, deductions if any (in case of
damaged or lost goods) and previous outstanding balance. Then the invoice is sent to the
customer. Draw the use case diagram with use case specifications. Draw the sequence
diagram for prepare invoice scenario

CLASS DIAGRAM

16
USECASE DIAGRAM

Accountant
place order
Company

Compare qty onhand vs req


amount

Prapare Delivery challan Inventory


Product Customer

Prepare Invoice

Receive Invoice

Store products

17
SEQUENCE DIAGRAM

: Customer : Accountant : Invoice inventory1 :


Inventory

place order

sends acknowledgement

check for availability


sends delivery challan
get the products
prepare
send to
copy to
copy to

18
COLLABORATION DIAGRAM

3: check for availability

1: place order
: Customer :
Accountant
2: sends acknowledgement

8: copy to
7: send to
6: prepare

5: get the products

: Invoice 4: sends delivery challan

9: copy to

inventory1 :
Inventory

19
7)Global group requires a system to be developed for maintenance of leaves in their
organization. There are different types of leaves: Casual leaves, Medical leaves, Earned leaves
and special leaves. These leaves vary from employee to employee. If the employee is regular he
can avail all types of leaves. An ad-hoc employee can only avail casual leaves. The medical and
earned leaves can be credited in the employees account. The maximum limit of the credit is
240. Further if an employee has availed all the leaves his salary may be deducted. Draw use
case diagram and also draw the class diagram for the given scenario
USE DIAGRAM

avail leave

avail medical leaves

avail casual leaveavail special leave


avail earned leaves
Company Employee

accountant
max limit 240 otherwise credit leaves
salary will be deducted

deduct sal

Regular Emp
Adhoc Emp
cal salary

paysalary

20
CLASS DIAGRAM

21
SEQUENCE DIAGRAM

: Employees : Leaves acco


untan
avail notified by

credit
checks whether max limit cross

calculates deductions and prepare pay slip

pay salary

8)An online railway reservation consists of the following activities. A Passenger can reserve a
ticket, cancel a ticket and enquiry. Each train has limited number of reserved seats. Once a
passenger cancels a ticket, required amount is deducted and the waiting list passenger is allotted
the seat. Passenger may also book a ticket in tatkaal scheme by paying additional amount.
Passenger who booked the ticket under tatkaal scheme can’t get any refund if the ticket is
cancelled. The chart is prepared two hours before the departure of the train. Draw class diagram
for the given scenario

22
USECASE DIAGRAM FOR ONLINE RAILWAY RESERVATION SYSTEM

gettrain information
Train

Reserveticket
Passenger

Cancelticket

Reservationsyste
m automated

get refund

Reserved
Passenger Waiting List
passenger
General

Tatkaal
pay additional amount for
reservation

23
9)An organization is interested in developing new student registration system. The system allows
students to register for courses and view reports cards from PC attached to the campus LAN as
well over the internet. Professors will be able to access the system to sign up to teach courses as
well as record grades of students. The registrar’s office will continue to maintain course
information through another system. At the beginning of each semester, students may request a
course catalogue, containing list of course offerings for that semester. Information about each
course, such as professor, dept and prerequisites will be included. Course offerings will have
maximum of 10 students and minimum of 3 students. Once registration process is completed for a
student the registration system sends information to the billing system so that student can be
billed for semester. Professors must be able to access the online system to indicate which courses
thy will be teaching. Draw class diagram and model sequence diagrams for any two scenarios.

CLASS DIAGRAM

24
USE CASE DIAGRAM

login process
billing process
<<includes>>
Internet

req catalogue of courses

Student registercourse
Online system

view reports
Campus Lan
UNIVERSITY
Professor
access systems

teach courses

Registrar

record grades
Accountant

maintain courseinf

25
SEQUENCE DIAGRAM

: : : course : : onlin
Stud Profe Regis Course Acco esyst

inf stored in database

req catalogue of course


sends a list of courses

register for course


sign in
validate user

authenticates and login

enquires the courses he need to teach

teach

record grades

sign in to maintain course inf


updates course inf
billing starts

completes course
receives bill
inf updated

26
10)The H.I Top School of Business operates international business programs in 10 locations
throughout Europe. The school had its first class of 9000 graduates in 1965. The school keeps
track of each graduate student. In order to maintain strong ties to its alumni, the school holds
various events around the world. The school needs to keep track of which graduates have
attended which events. For an attendance by a graduate at an event, a comment is recorded
about information. A report is produced showing the latest information about that graduate &
the information learned during the past two years from that graduate from all contacts &
events the graduates attended. Since the strength of the student is increasing day by day.
Draw class diagram and sequence diagram for any one of the scenario.

CLASS DIAGRAM

27
USE CASE DIAGRAM

Trains student

Information is stored

Information is stored
Conducts Events

School

Keep track of students Database

Produce Reports

Information is stored

Student
Tie with alumini

Participate in events

28
SEQUENCE DIAGRAM

: Events : : STUDENT myda


HITOPSCHOO EVENTS tabas
trains

conducts

participates in
inf stored in

comment recorded

acces student inf after 2 yr

produce reports(latest and past 2yr)

11)The Zero bicycle company builds custom bicycles. It has a comprehensive help
system that describes the company and the individual forms. The database contains
realistic data for hundreds of customers and bicycles. One of the most important tasks at
the zero bicycle company is to take orders of new bicycles. Several features have been
included to help non-experts select a good bicycle. As the bicycles are built, the
employees record the construction on the Assembly form. When the bicycle is shipped,
the customers are billed. Customer payments are recorded in the financial forms. As
components are installed on bicycles, the inventory quantity is automatically decreased.
Merchandise is ordered for suppliers and payments are made when shipment arrives.
Draw the use case diagram and class diagram

29
CLASS DIAGRAM

A COMPREHENSIVE HELP SYSTEM FOR ZERO


BICYCLES

takes orders from


HELPSYSTEM Customer send bill to
Accountant

prepares
Shipment
Company Form Individual Company
Individual Form
Bill for customers

Bicycles Contains realistic inf of


Database 100's customers and

Record Inf in
Employee AssemblyForm

Financial Form

30
SEQUENCE DIAGRAM

: Company : : Customer : Bicycles : Database


HELPSYSTEM

provides
use

provide special features


orders
assembly inf is stored

acccess assembly inf in assembly forms

shipped to

payment inf stored in financial forms


main copy stored in database

bill sent to customer

shipment received

customer pays the bill

information updated in database

31
USE CASE DIAGRAM

make payments

form

company
usehelp

companyforms otherforms
takeorders

customer
employee
recordinfo

prepare bills assemblyform


financialform

otheremployee accountant
recordpayments

32
12)The book club has members. The book clubs sells books to its members. The member places
orders for books, which the book club full fills. Each order contains one or more than one
books. The books are written author(s). The publisher publishes the book. An author can write
more than one books and a book can have more than one author. A book is published by a
publisher, but a publisher publishes many books. A member can place more than one order. The
member also can choose not to place an order. The book club sells many books. Draw a use
case diagram with suitable relationships between use cases and model a class diagram.

CLASS DIAGRAM

BookClub

takes sells

publisher
* publish
places 1
Order Member Book
*
0..* writes
*

author
*

33
USE CASE DIAGRAM

place order

BookClub

writebooks
Book

publishbooks Publisher
Member

sellbooks

Author

34
13)LAH University offers P.G program for working men. Candidates submit the application
form to the registrar. The registrar’s office issues call letters to the candidates for writing the
written test based on the following criteria: The first criterion for selection is that the candidate
should be an engineering graduate or must have a PG degree (non-engineering). The second
criterion is that the candidate should put a minimum of 2 years full time experience after the
qualifying degree. The candidates qualified in written test are called for spot admissions and the
seats are allotted based on the following distribution of seats: 30% of seats are reserved for ST,
10% for SC, 10% for BC & 20% for women and the remaining seats are under open
competition. Draw a use case diagram.

CLASS DIAGRAM

35
USECASE DIAGRAM

Univeristy

Candidate

conduct pg program

RegistrarOffice

issue call letters

Registrar
submit forms

written based

conduct interview

select qualified candidates


2 yrs job give spot admissions
experience

36
14)A customer is charged for using various data services on the mobile network. When a call is
made the signal is sent to the tower. The tower has a switch in which the files are stored. Each
call which is made is stored in form of a record in the file. This file consists of a header which
will give the number of records present. The record will consist of information such as (i)
From which number the call was made (ii) To which number (iii) call duration (iv) pulse rate,
etc. This will differ from call to call (Local, STD, ISD). Draw use case diagram and sequence
diagram for one of the scenario.

CLASS DIAGRAM

37
USECASE DIAGRAM

makecall

Customer File

recordcall

Storefile

Tower paythe bill

SEQUENCE DIAGRAM

: Customer : Mobile : Tower : File


Network
makes a call receives signal

access to know the type of call

start recording/start billing

send bill to the customer

38
15)You have been hired to design a system for small health care organization. The clinic
consists of several examining rooms and few rooms for short term critical care patients. A core
staff of seven physicians is supplemented by internists from a local teaching hospital. Patient’s
medical data is stored in the central database. Patients first sign in at the front desk. Clerk
checks the billing records, prints a summary status sheet and obtains file number from the
system. The clerk then selects the examination room for the patient based on the case. After
waiting for the physician, the clerk moves the data packet and the patient to the examination
room. A nurse records basic medical data (weight, B.P etc). The physician makes additional
notes to both the medical and billing data and generally writes the prescription order which is
given to the patient and recorded on the charts. When the patient leaves, the clerk enters the
new billing data into the system (if any). The new billing data is forwarded to appropriate
insurance company. Identify the classes and draw the class diagrams with appropriate
relationships, multiplicities etc.

CLASS DIAGRAM

39
16)OU’s Central library issues books to the staff and students. Students can avail 3 books and
staff can avail max of 5 books. The books are issued to the students for a period of one month.
Thereafter a fine of Rs. 1/- for each day is charged. The faculty members don’t pay any fine.
However they have to return the book at the end of semester. The Library receives the
requisition from various departments to new books. Once it is approved the order is placed to
the various vendors. University gives an order of the books to a particular vendor based on the
competitive prices they offer.

CLASS DIAGRAM
enroll in
Students University

1..* Department

to
receive requisites
{issues for 1 month thereafter 1 rs fine per day}

OUCentral Library Staff


issues
*
Books
to place order

* vendor
return
*
{at the end of semister} Faculty

40
USECASE DIAGRAM

place order
university vendor

issuebooks

collectrequisites

student department faculty approverequisition


library

calculatefine

returnbooks

41
SEQUENCE DIAGRAM

: OUCentral : Faculty : Students : vendor


Library

takes requisitions

place order

receive books

issuebooks

issue books

return books with/without fine

return books at sem end

updates information

42
17)Mega super market has three checkout counters. In order to improve the checkout process
a PC has been set up at each of these counters along with the printer. Each item in the super
market is packed & each packet carries on it a price tag on which are printed its item code and
price. Each customer picks out the desired packet from the shelves place them in the standard
shopping basket supplied by the super market and carries the basket to one of the checkout
counters. The counter operator takes out each of the packets from the basket, keys in the 12
digit item code. The amount is collected from the customer and a bill is printed and issued to
the customer. Identify the classes and draw class diagram with suitable relationships,
multiplicities and roles.

CLASS DIAGRAM

43
STATE DIAGRAM

item gets selected

item is placed

item shifts to counter

operator verifies item price

calculate amount for the number of items

customer pays for the items

18)A laboratory has several chemists who work on one or more projects. Chemists (Empid,
Name, Phone_no) also may use certain kinds of Equipments (Serial_no, cost) on each project
(Projectid, start_date). The organization wishes to record assign- date i.e., the date when the
given equipment item was assigned to a particular Chemist working on a specified project, as
well as total number of hours the chemist has used the equipment for the project. The chemist
must be assigned to at least one project and one equipment item. Draw the use case diagram
and class diagram.

44
CLASS DIAGRAM

45
USECASE DIAGRAM

lab

useequipment

project

assign project

chemist

organization
recordinfo

equipment

19)An Online examination system maintains a huge database of questions which are
classified according to different parts of the syllabus and also according to difficulty level. In
the beginning a student is considered to be an average student with a percentile of 50 and is
given questions of medium difficulty randomly from the total syllabus. From here the type of
questions presented varies according to the performance. The score starts with a value equal
to the score obtained by a person with a percentile of 50. The score is calculated after every
question and the change is score depends on difficulty level of the question. There is a
restriction on the minimum number of questions of each type and a test taker may get more
questions in any particular section if his performance in that section is below his overall
performance. Draw sequence Diagram

SEQUENCE DIAGRAM

46
: Online : Syllabus : Questions
: student
Examination

access

prepares

build rules

access questions

evaluates and grades

47

You might also like