U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

OMG-OCUP2-ADV300 Exam - Topic 6 Question 42 Discussion

Choose the correct answer:A framework developer has been given a requirement to create an extensible utility for solution developers to use to create collections. The framework developer has submitted the following diagram fragment for review:Which review comment is valid and applicable?
B) The bind relationship between the concrete class Vector and the abstract class AbstractList is incorrect. It should be a Generalization relationship.
A) The upper limit of 10 for the Size of PhontyQueue is too small and should be increased to at least 20 to accommodate special cases.
C) The Generalization relationship between the concrete class PriorityOueue and the abstract class AbstractQueue is incorrect. It should be a bmd relationship.
D) The template parameter Size cannot be added to a specialized class. It needs to be moved to the top of the hierarchy and added to AbstractCollection and AbstractQueue.

OMG-OCUP2-ADV300 Exam - Topic 6 Question 42 Discussion

Actual exam question for OMG's OMG-OCUP2-ADV300 exam
Question #: 42
Topic #: 6
[All OMG-OCUP2-ADV300 Questions]

Choose the correct answer:

A framework developer has been given a requirement to create an extensible utility for solution developers to use to create collections. The framework developer has submitted the following diagram fragment for review:

Which review comment is valid and applicable?

Show Suggested Answer Hide Answer
Suggested Answer: B

In UML, the bind relationship is used to specify that a class is a template instantiation of a template class, where actual parameters are bound to the formal parameters of the template class1. However, in the case of the relationship between a concrete class likeVectorand an abstract class likeAbstractList, the correct relationship should be Generalization, not bind.

Generalization is a taxonomic relationship between a more general classifier and a more specific classifier.Each instance of the specific classifier is also an instance of the general classifier1. Thus,Vectorbeing a concrete implementation ofAbstractList, should inherit fromAbstractList, which is correctly represented by a Generalization relationship in UML.

The other options can be evaluated as follows:

Option A:The upper limit for the size ofPhontyQueueis a design decision that should be based on the requirements and use cases of the application. It is not inherently incorrect in UML to have a specific upper limit.

Option C:The Generalization relationship is correctly used betweenPriorityQueueandAbstractQueueas it represents inheritance in UML.

Option D:While it is true that template parameters are typically defined at the top of the hierarchy, the statement is too absolute. In UML, template parameters can be added to specialized classes, but it depends on the specific design and requirements. Therefore, without additional context, this statement cannot be deemed universally valid.

In conclusion, the most applicable and valid review comment is option B, which correctly identifies the misuse of the bind relationship in the context of the class diagram provided.


Contribute your Thoughts:

0/2000 characters
Olen
1 day ago
I’m not sure about D, moving the parameter sounds complicated.
upvoted 0 times
...
Jeannetta
2 months ago
Wait, is the size really too small? 10 seems fine for most cases.
upvoted 0 times
...
Renay
2 months ago
Totally agree, the generalization is definitely off.
upvoted 0 times
...
Kristine
2 months ago
I think option B makes the most sense.
upvoted 0 times
...
Devora
2 months ago
D) Moving the template parameter makes sense for clarity.
upvoted 0 times
...
Lorrie
2 months ago
C) Wait, is that really a bmd relationship? Sounds weird.
upvoted 0 times
...
Mitsue
2 months ago
B) That bind relationship looks off to me.
upvoted 0 times
...
Sherill
3 months ago
Totally agree, 20 would be better!
upvoted 0 times
...
Rolande
3 months ago
A) 10 seems too low for a queue size.
upvoted 0 times
...
Vonda
3 months ago
The comment about the Generalization relationship seems off to me. I thought Generalization was for inheritance, not binding. I need to double-check that.
upvoted 0 times
...
Lakeesha
3 months ago
I'm a bit confused about the template parameter Size. I thought it could be added to specialized classes, but now I'm not so sure.
upvoted 0 times
...
Lorean
3 months ago
I think I saw a similar question about relationships in UML diagrams. I feel like the bind relationship should indeed be a generalization, but I can't recall the exact definitions.
upvoted 0 times
...
Amie
3 months ago
I remember discussing the importance of collection sizes in class, but I'm not sure if 10 is really too small. It might depend on the use case.
upvoted 0 times
...

Save Cancel