This question has been discussed in this forum. I bring it up here again because I am not convinced by the agreed answer, which seems to be A. I think it should be C. Any comments? Anyone who got 100% can tell us the correct answer?
Referring to the sequence diagram in Figure Interaction, what methods MUST be implemented by the Account class? a) withdraw, checkBalance b) withdraw, log, checkBalance c) withdraw, checkBalance, acknowledge d) withdraw, acknowledge
The question asks exactly - "what methods MUST be implemented by the Account class?" The only 2 i see are withdraw(anAmount) & checkBalance(anAmount) . "acknowledge" doesnt have any method brackets so as far as I can see , its not a method ......... Thats my take on it.
Hi! The correct answer is "A". "c" is not correct because acknowledgement is not a message, it basically indicates a return of control. I have got 100% in "Mock Exam" so i might be correct Thanx Asif Abbasi
Hi ! just clearing an earlier message By not a message i mean that not valid to be implemented in Account class, as it indicates a return of control if u see the figure clearly u 'll find that this message is bolder that the other ones. sorry, if the earlier message caused ne confusion. Thanx Asif
Even I was thinking why Account class doesnt have log method. The reason, I guess is that the Account class is calling the log method of the AuditLog class. The task of logging is defined in AuditLog class, although it is being called by the Account class. Regards Mohit Joshi
posted 19 years ago
Thanks. I think the acknowledge could be a return from log method. is it correct?
Originally posted by Changen Li: Thanks. I think the acknowledge could be a return from log method. is it correct?
Shouldn't be. Not sure about the notation on a bold line or a "without bracket" notation thing, but to represent a return from a method should be depicted like this : - message(input; output) example, log(accountAction; returnResult)
Hi, The correct answer is A. Although, the diagram should have used the keyword return instead of acknowledge, I believe it does communicate to the Developer the message of successfully logging the account action.Keeping this in view, we may assume that this method is not a must to be implemented. Hope this helps, Sandeep SCJP2,OCSD(Oracle JDeveloper),OCED(Oracle Internet Platform)
Destroy anything that stands in your way. Except this tiny ad: