Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

OMG-OCUP2-FOUND100 Exam - Topic 5 Question 52 Discussion

Choose the correct answer:Which elements in the diagram are Features of the Car class?
D) driveO, stop(). Person
A) drive(), Car
B) stop(). driver
C) name. stop()

OMG-OCUP2-FOUND100 Exam - Topic 5 Question 52 Discussion

Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 52
Topic #: 5
[All OMG-OCUP2-FOUND100 Questions]

Choose the correct answer:

Which elements in the diagram are Features of the Car class?

Show Suggested Answer Hide Answer
Suggested Answer: D

In UML, the features of a class are the combined set of attributes (properties) and operations (methods) that are defined for that class. A feature is a characteristic that classifiers (like classes) can possess. In the context of UML, operations are considered behavioral features, while attributes are considered structural features.

Let's analyze the given options in the context of the Car class:

A . 'drive()' is an operation (method) of the Car class, but 'Car' itself is the name of the class, not a feature.

B . 'stop()' is an operation of the Car class, but 'driver' is a role name for an association, not a feature of the Car class.

C . 'name' is an attribute of the Person class, not the Car class. 'stop()' is indeed an operation of the Car class.

D . 'drive()' and 'stop()' are operations of the Car class. 'Person' is not a feature of the Car class, but no attributes of the Car class are shown in the diagram, and since features include both operations and attributes, the correct answer from the available options is D. It is understood that operations of a class are features, so the answer includes both operations of the Car class: 'drive()' and 'stop()'.

According to the UML 2 Foundation specification, both structural features (attributes) and behavioral features (operations) are considered features of a class, so the correct answer would be the operations 'drive()' and 'stop()' since those are the only features explicitly represented in the Car class in the diagram.


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel