Task 6 (3 marks)
Develop a class diagram corresponding to your sequence diagram from Task 5. Show
only operations in classes (specify names of operation’s arguments and return types).
Show constructors for classes that were instantiated in Task 5. Specify relationships
between classes (use uni-directional associations unless the interactions from Task 5
suggest both-directional communication). Show visibility of operations. Describe the
meaning of the model, including any assumptions you have made, in text under the
diagram.
Task 6 Answer:
The class model is a direct transformation of information present in sequence/collaboration model
for Task. The only additions relate to the visibility and to return types of operations. Operations
that are internally called by an object are given private visibility (as they are called within the
same class).
The login() operation in PKioskLogin returns Boolean, although the client class is in fact an actor
(Academic). In practice, login() will not return void, but it will invoke an error function if the
login’s validation() is not successful. Operations in other classes called by Academic return void,
as expected. The reason for this misalignment is strictly of educational nature.
Task 7 (3 marks)
Describe the definitions and differences between desktop clients and browser clients.
And Give a GUI design for both desktop client and browser client.
MMediator
save(form) : Boolean
PKioskLogin
login(name, psswd) : Boolean
validate(name, psswd) : Boolean
PKioskEntry
PKioskEntry(loginName)
getPayMethod() : void
PPayMethod
PPayMethod(loginName)
modify(option) : void
displayEntryForm() : void
saveChanges() : void
refreshForm() : void
EPayMethod
getExisting(loginName) : EPayMethod
CModifyPayMethod
getExisting(loginName) : EPayMethod
save(form) : Boolean
FWriter
updateDatabase(sql) : Boolean