How to express that some person keeps animals as pets ?

In a UML class diagram the two kinds of things are classes (Person, Animal) and the relationship between them is an association line. A role name written at one end of the line tells what part the class at that end plays, and the multiplicity written at the same end tells how many objects of that class take part.
The four diagrams: in A and B the classes are Person and Animal, joined by a plain line with 0..* at the Animal end; in A the label pet is written below the line, apart from the multiplicity, while in B pet and 0..* are written together above the line at the Animal end. In C the classes are Person and Pet with the label animal at the Pet end. In D the classes are Person and Animal, 0..* sits at the Person end and the line carries the association name 'keep pet as' with a reading arrow.
The required meaning is: a person has zero or more animals, and those animals play the role of pet. Diagram B states exactly this, with the role name and its multiplicity written together as one end label at the Animal end, read as 'a Person has 0..* Animals in the role pet'.
Diagram C is wrong because Pet is only a role an animal plays, not a separate class, and it swaps the role name. Diagram D places 0..* at the Person end, so it counts persons per animal, and uses an association name instead of a role name for pet. Diagram A separates the role label from its multiplicity, so it does not present them as a single end label in the standard way.
Hence, the answer is option B.
Which of the following statement is not True?
What is true about UML stereotypes ?
Which of the following is not a member of class ?
Which of the following differentiates between overloaded functions and overridden functions ?
All the classes necessary for windows programming are available in the module :
Superficially the term “object-oriented”, means that, we organize software as a
The “part-whole”, or “a-part-of”, relationship in which objects representing the components of something associated with an object representing the entire assembly is called as
The pure object oriented programming language with extensive metadata available and modifiable at run time is
A friend function can be used to
Match the following w.r.t. programming languages :
| List - I | List - II |
| (a) JAVA | (i) Dynamically object oriented |
| (b) Python | (ii) Statically Non-object oriented |
| (c) Prolog | (iii) Statically object oriented |
| (d) ADA | (iv) Dynamically non-object oriented |
Codes :
Which operator is used for dynamic memory allocation in C++?
Which statements is correct regarding main () function in C++?
I. It is a user defined function.
II. It is a pre-defined function.