• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

A question from sample test 486

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

( http://certify.torolab.ibm.com/figures/test486F15.gif )
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Muhammad Asif
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The questions emphasized on "MUST"
So it is not necessary to include acknowledgement in the sequence diagram. i.e u dont have to show the return.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with others as acknowledge doesnt have round brackets around it, maybe just signifies a return of control
Rajesh Kumar
SCJP
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a pure oo perspective, acknowledge should not be part of the the Account entity.
Acknowledge is more of a session requirement as you are dealing with a user.
I think the correct answer is A.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please explain me why log is not implemented by the account class?
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Changen Li
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I think the acknowledge could be a return from log method. is it correct?
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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)

------------------
Thank you.
- Simon See
[email protected]
-after office hours-
necro-mani-cide
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic