889
889
A) Has-a
B) Is-a
C) Association
D) Aggregation
5. What term is used to describe a stronger form of association where one class "owns" objects of
another class?
A) Inheritance
B) Aggregation
C) Composition
D) Encapsulation
Unit 4: Polymorphism
1. What is polymorphism in Object-Oriented Programming?
A) The process of hiding the implementation details of an object's state
B) The process of creating duplicate objects
C) The ability of a method to do different things based on the object it is acting upon
D) The process of defining multiple constructors for a class
9. In C++, can a subclass method override a superclass method with a broader access modifier?
A) Yes
B) No
Unit 5:
1. Which of the following best describes a String in C++?
A) A primitive data-type
B) An array of characters
C) An object that represents a sequence of characters
D) A class that cannot be instantiated
5. In a Library Management System, what data collection might be used to store information about
books and their availability?
A) ArrayList
B) HashSet
C) TreeMap
D) LinkedList
10. In a Library Management System, what data collection might be used to store information about
library members and their borrowed books?
A) HashSet
B) LinkedList
C) TreeMap
D) HashMap