Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > UML Certification Review Questions > ICE Exam ?: Best source for locating public method?
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
Luigi
Junior Member

Registered: Sep 2002
Location: San Diego, CA
Posts: 26

Question ICE Exam ?: Best source for locating public method?

I was reviewing the following question below, and chose (C) as the correct answer noting that class diagrams define visibility and the question points to "public" method.

However, the answer is (b) according to the posted answer sheet. Interaction diagrams don't denote visibility they just presume visibility. Can anyone ellaborate on this one?

Thanks...

If a use case had a requirement "Calculate account balance," which OOAD artifact would be the BEST source for determining the name of the public method used to invoke the operation?

a) Use case

b) Interaction diagram

c) Class diagram

d) Activity diagram

__________________
Lou

Report this post to a moderator | IP: Logged

Old Post 09-09-2002 11:52 PM
Luigi is offline Click Here to See the Profile for Luigi Click here to Send Luigi a Private Message Find more posts by Luigi Add Luigi to your buddy list Edit/Delete Message Reply w/Quote
bparanj
CTO, Zepho Systems

Registered: May 2002
Location: Raleigh, North Carolina
Posts: 277

Hi,

You cannot send a message to an object unless you have visibility to that method. The interaction diagram is more intuitive in the sense that you show the arrow indicating the message.

In the class diagram the public method can be shown with a + sign before the name of the method, when you read the diagram it has to be interpreted.

So I would pick interaction diagram over the class diagram.

Bala

__________________
Sun Certified Developer for the Java 2 Platform
http://uml.zepho.com

Report this post to a moderator | IP: Logged

Old Post 09-10-2002 02:41 AM
bparanj is offline Click Here to See the Profile for bparanj Click here to Send bparanj a Private Message Visit bparanj's homepage! Find more posts by bparanj Add bparanj to your buddy list Edit/Delete Message Reply w/Quote
joe abraham
Junior Member

Registered: Aug 2002
Location:
Posts: 4

My doubt is as in object important design, i.e. OOPS-class diagram comes before making interaction diagram.

So in class diagram we are defining public methods.Then how 'interaction' diagram come in between.
Kindly give a reply

Report this post to a moderator | IP: Logged

Old Post 09-12-2002 07:53 AM
joe abraham is offline Click Here to See the Profile for joe abraham Click here to Send joe abraham a Private Message Find more posts by joe abraham Add joe abraham to your buddy list Edit/Delete Message Reply w/Quote
Luigi
Junior Member

Registered: Sep 2002
Location: San Diego, CA
Posts: 26

Explicit visibility in class diagram

I agree with you Bali that you certainly need visibility between objects to have a message between objects in an interaction diagram, but visibility is implicitly defined there (i.e., is public but could also be protected or friend). It's in the class diagram where visibility is explicitly defined.

For instance, suppose the question was worded with "protected" vs. "public" method. Would you still say interaction diagram?

Just playing devils advocate, but to conclude, I feel the the question can be perceived as a little ambiguous. I can imagine it must be a fine art to know when to read into the question more or not to pass this exam.

__________________
Lou

Report this post to a moderator | IP: Logged

Old Post 09-12-2002 04:36 PM
Luigi is offline Click Here to See the Profile for Luigi Click here to Send Luigi a Private Message Find more posts by Luigi Add Luigi to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

The question is strange because operations are always associated with a class or object. In real development, you don't go hunting for an operation over the set of classes in an application. You look at the classes that best represent the abstraction, i.e. Account, and then look for methods that calculate the balance.

However, the question takes a more purist approach and assumes that the interaction diagrams will be easily associated with the appropriate use case (a big assumption) and assumes that the user will not necessarily find the right abstraction for the concept and will therefore have to follow the interaction diagram flow to find the message that approximates the calculate account balance operation.

Certainly it can be done this way. The real question is which way would you most likely pick?

Report this post to a moderator | IP: Logged

Old Post 09-12-2002 05:25 PM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
bparanj
CTO, Zepho Systems

Registered: May 2002
Location: Raleigh, North Carolina
Posts: 277

quote:
Originally posted by joe abraham
My doubt is as in object important design, i.e. OOPS-class diagram comes before making interaction diagram.

So in class diagram we are defining public methods.Then how 'interaction' diagram come in between.
Kindly give a reply



The interaction diagrams are extensively used for assigning responsibilities to the classes, distributing the system intelligence evenly across all classes. This helps to come up with a cohesive set of classes and reduces coupling. You have to minimize the amount of messages sent by a class in order to accomplish a task (by applying good encapsulation principles).

There is no correct sequence of activities to be performed to find the classes and their responsibilities.

I agree that the question is ambiguous and the answer is really dependent on a person's preference.

Bala

__________________
Sun Certified Developer for the Java 2 Platform
http://uml.zepho.com

Report this post to a moderator | IP: Logged

Old Post 09-12-2002 07:27 PM
bparanj is offline Click Here to See the Profile for bparanj Click here to Send bparanj a Private Message Visit bparanj's homepage! Find more posts by bparanj Add bparanj to your buddy list Edit/Delete Message Reply w/Quote
Guenavan
Junior Member

Registered: Aug 2003
Location:
Posts: 3

interaction diagrams neither restrict nor show operations visibility.ABSOLUTELY

This is incorrect that there may be only public operations in interaction diagrams.

The message may be sent even to private method by the same object on itself. It is called self-call (Fowler) and is also shown in Larman or private operation may be invoked/exposed through a delegation.

In Java the message may be sent to private method not only by the same object but by another object of the same class.

Certainly neither of private, internal, protected, friend, public visibility does prohibit/determine exposure of interaction between objects. As well as visibility is not shown or can be determined from interaction diagrams.

I also have seen a question-answer in this site defining that Interaction Model shows only public operations. Where is it from? that object interactions exposure is restricted by ONLY public operations?

Last edited by Guenavan on 01-03-2004 at 03:27 PM

Report this post to a moderator | IP: Logged

Old Post 01-03-2004 12:40 PM
Guenavan is offline Click Here to See the Profile for Guenavan Find more posts by Guenavan Add Guenavan to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 05:29 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2017, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.