You are on page 1of 3

TDB4323 SOFTWARE DESIGN & ARCHITECTURE

SEPTEMBER 2020
TEST 02 (Set A)

Matrics ID 18002908
Name Fatin Nasuha Binti Abdul Razak

Instruction: Please answer by uploading the whole document into ULearn link. Your answer can be
done using tool or by hand-drawing. Plagiarism results in non-negotiable zero mark.

There are two actors for a queue management system:- Customer and Employee.

Customer uses TicketGenerator to get a ticket with number. On the other hand, Employee uses
GetCustomer to display the serving number. Customer with similar ticket number will be served by
the Employee.

A queue management system has the above class diagram.

• A ticket object contains the ticket number. The ticket number is acquired from
TicketGenerator.

• TicketGenerator begins with running number 0, but each time the nextTicketNum() is
triggered, it will return runningNum + 1.

• GetCustomer begins with running number 0, but each time the showNextNum() is triggered,
it will increment runningNum by 1 and display the value on the screen.

• Triggering reset() method in either GetCustomer or TicketGenerator class will set both classes’
runningNum back to zero.
Question:

1. Study the above class diagram and determine the following matrices. [Note: Must show the
steps to derive the answer to earn marks]

[18 marks]

Class WMC Fan-In Fan-Out


GetCustomer 2 1 1
TicketGenerator 2 2 1
Ticket 1 0 1

2. Are the above class diagram design cohesive? Explain.

Yes, the class diagram show the design is cohesive. This is because cohesion of method
happened occurs when there is an intensive use of the same attributes by the method
belonging to similar class. It was break into class. The diagram easy to understand and can
decide later either need to break the class or not.

All the attributes related to each other for example count and display the next number and
reset number. [2 marks]

3. Draw a sequence diagram to illustrate the sequence of steps in Customer acquiring a new ticket
number. [15 marks]

= End of Questions =
Visual Paradigm Online Express Edition

interface : UI Ticket Generator route : Ticket route : Employee

Customer
getTicketNum

running number

find next ticket number

route

getnextTicketNum()
show next number

pick number

triggered

show increment running number

ticket number reset to 0


show reset number

Visual Paradigm Online Express Edition

You might also like