![Mcqmate logo](https://mcqmate.com/images/logos/logo-black.png)
![Mcqmate logo](https://mcqmate.com/images/logos/logo-white.png)
McqMate
Q. |
Which of the following is correct? |
A. | an attribute is an class variable when each object stores its own value for the attribute |
B. | an attribute can also be a instance variable, which means that there is only one value stored for the attribute that is shared by all class instances |
C. | an instance operation can be called using any object |
D. | a class operation is encapsulated in a class and can be called through the class |
Answer» D. a class operation is encapsulated in a class and can be called through the class | |
Explanation: an attribute is an instance variable when each object stores its own value for the attribute whereas an attribute can also be a class variable, which means that there is only one value stored for the attribute that is shared by all class instances and an instance operation can be called only by using instance. |
View all MCQs in
Unified Modeling Language (UML)No comments yet