MCQ CH04 Uml M3

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

UML

MCQ
Chapter 04: What is Object-Orientation?

Q1. What is an abstraction?


A. A form of representation which includes only what are important from a particular viewpoint
B. A form of representation which includes every possible detail about a concept whether it is important or not
C. A design pattern that solves a common problem.
D. It is an application framework
Answer: A

Q2. Which of the following are two main purposes that objects serve?
A. Objects are used to model an understanding of the application domain
B. Objects are used to understand data flow behavior in an application
C. Objects are understood as parts of the resulting software and provide basis for implementation
D. Objects are used as blueprints for class designer
Answer: A, C

Q3. Which of the following features all objects have?


A. State
B. Behavior
C. Identity
D. Security
Answer: A, B, C

Q5. Which of the following qualities every object must have?


A. State
B. Behavior
C. Identity
D. Position
Answer: A, B, C

Q4. Which of the following feature or features represent the condition that an object is in a particular moment?
Find out the appropriate word for the blank.
A. State
B. Behavior
C. Identity
D. All of the above
Answer: A

Q5. What is “state” of an object?


A. The condition of an object at a given moment
B. What the object can do
C. How an object responds to events
D. Uniqueness of an object
Answer: A

Q6. _________________ represents the thing an object can do.


Find out the appropriate word for the blank.
A. State
B. Behavior
C. Identity
D. All of the above
Answer: B
Q7. ___________ makes an object unique.
Find out the appropriate word for the blank.
A. State
B. Behavior
C. Identity
D. All of the above
Answer: C

Q8. Which of the following makes an object identifiable from a set similar or dissimilar set of object?
UML

A. State
B. Behavior
C. Identity
D. All of the above
Answer: C

Q9. All objects are ___________ of some class.


Which one best fits the blank.
A. Children
B. Sub-classes
C. Parent
D. Instances
Answer: D

Q10. __________ represents a particular instance of a class?


Which one best fits the blank.
A. An object
B. An interface
C. A package
D. A structure
Answer: A

Q11. Which of the following refers to a single object?


A. An instance
B. An interface
C. A package
D. A structure
Answer: A

Q12. “A descriptor for a collection of objects those are logically similar in terms of their behavior and the structure of
their data”
What is the statement about?
A. Class
B. Instance
C. Generalization
D. Specialization
Answer: A

Q13. Which of the following features will be same for two instances of a class?
A. Structure of data they hold
B. Behaviors
C. Value of attributes
D. State
Answer: A, B [Page 67, States, values of properties may not the same for two objects]

Q15. Which of the following is / are true about an instance of a class?


A. An instance originates from a class
B. An instance holds information that remains unchanged during its lifetime
C. An instance is structured according to its class
D. An instance behaves according to its class
Answer: A, C, D

Q16. Which of the following two types of logical similarity ensure that two instances belong to the same class?
A. Both the two objects share a common set of attributes (descriptive characteristics)
B. Both the two object share the same identity
C. Both the two object share a common set of behaviors (operations)
D. Both the two objects use the same algorithm to perform a particular task
Answer: A, C

Q17. Which of the following is / are true about generalization?


A. It is a taxonomic relationship between a more general element and a more specific element
B. The more specific element is fully consistent with the general element and contains additional information
C. The more specific element can now relate itself to other class
UML

D. The more specific element blocks all the features of inherited from the general element from transferring to
the next level
Answer: A, B

Q18. Which of the following are true about generalization and specialization?
A. It is a hierarchic classification
B. As we move from the root towards the leaf a more specific element is found
C. Every element is fully consistent with the first element in the hierarchy
D. None of the above
Answer: A, B, C

Q19. Which of the following feature or features all sub-classes inherit from its super-class?
A. Information structure (characteristics)
B. Behavior
C. Identity
D. State
Answer: A, B

Q20. Which of the following are the rules of inheritance?


A. A sub-class always inherits all the characteristics from its super-class
B. A sub-class always inherits all states from its super-class
C. The definition of the sub class includes at least one detail not derived from its super class
D. A sub-class is always changes at least one behavior of its super-class
Answer: A, C

Q21. What does transitive operation refer to?


A. A sub-class can not inherit from more than one class
B. A sub-class always inherits all the characteristics from its super-class
C. All features of a class is carried over to a sub-class at next adjacent level
D. All of the above
Answer: C

Q22. What does “disjoint nature of generalization” refer to?


A. A sub-class can not inherit from more than one class
B. A sub-class always inherits all the characteristics from its super-class
C. All features of a class is carried over to a sub-class at next adjacent level
D. All of the above
Answer: A

Q23. Objects communicate each other by ________________.


Which one best fits the blank.
A. By sending messages
B. By creating in-memory connection
C. By implementing inheritance
D. By using collaborator
Answer: A

Q24. Objects communicate by ___________.


A. sending message
B. generating event
C. sending signals
D. encapsulating each other
Answer: A

Q25. An object encapsulates data and processes to act on this data. These processes are called ______________.
Which one best fits the blank.
A. Signature
B. Protocol
C. Operations
D. State
Answer: C

Q26. Each operation has a specific _____________________.


UML

Which one best fits the blank.


A. Structure
B. Argument
C. Parameter
D. Signature
Answer: D

Q27. __________________ is the definition of an object’s interface.


Which one best fits the blank.
A. An Operation Signature
B. An attribute
C. A method
D. A message
Answer: A

Q28. In order to invoke an operation, its _________ must be given.


Which one best fits the blank.
A. Structure
B. Argument
C. Parameter
D. Signature
Answer: D

Q29. Operation signatures are also called __________.


Which one best fits the blank.
A. Message binding
B. Message protocols
C. Message calling
D. Asynchronous operation
Answer: B

Q30. Which of the following is or are true about polymorphism?


A. Polymorphism allows one message to be sent to objects of different classes and each object responds
differently
B. Polymorphism allows to create more than one object of a class in the same operation
C. Polymorphism allows to restrict access to an object’s operations
D. All of the above
Answer: A

Q31. “The ability of different methods to implement the same operation in different ways those are appropriate to its
class”
This statement is about _________.
A. Inheritance
B. Generalization
C. Specialization
D. Polymorphism
Answer: D

Q32. Which of the following is or are true?


A. An object’s state is determined by the values of its attributes
B. An object maintains its state until an external stimulus change it
C. An object’s state affects the way it responds to messages
D. An objects state can not be changed by its own operation
Answer: A, B, C

Q1. “A descriptor for a collection of objects those are logically similar in terms of their behavior and the structure of
their data”
UML

What is the statement about?


A. Class
B. Instance
C. Generalization
D. Specialization
Answer: A
Q2. Which of the following features will be same for two instances of a class?
A. Structure of data they hold
B. Behaviors
C. Value of attributes
D. State
Answer: A, B [Page 67, States, values of properties may not the same for two objects]

Q3. Which of the following is are true about an instance of a class?


A. An instance originates from a class
B. An instance holds information that remains unchanged during its lifetime
C. A instance is structured according to its class
D. An instance behaves according to its class
Answer: A, C, D

Q4. Which of the following is or are the rules of inheritance?


A. A subclass always change the characteristics of its superclass
B. A subclass always inherits all the characteristics of its superclass
C. A subclass must redefine all the characteristics of its superclass
D. The definition of a subclass always includes at least one detail not derived from any of its superclasses
Answer: B, D [See Page 72]

Q5. Which of the following qualities every object must have?


A. State
B. Behavior
C. Identity
D. Position
Answer: A, B, C

Q6. What is “state” of an object?


A. The condition of an object at a given moment
B. What the object can do
C. How an object responds to events
D. Uniqueness of an object
Answer: A

Q7. Objects communicate by ___________.


A. sending message
B. generating event
C. sending signals
D. encapsulating each other
Answer: A

Q8. “The ability of different methods to implement the same operation in different ways those are appropriate to its
class”
This statement is about _________.
A. Inheritance
B. Generalization
C. Specialization
D. Polymorphism
Answer: D

You might also like