Professional Documents
Culture Documents
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 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]
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
Customer
getTicketNum
running number
route
getnextTicketNum()
show next number
pick number
triggered