Page 21 - CA_Blue( J )_Class10
P. 21
5. Which of the following types of languages are machine-independent?
a. Low-level language b. High-level language
c. Both a and b d. None of these
6. Wrapping up data and Member functions together into a single unit is called ………………….
a. Encapsulation b. Data abstraction
c. Inheritance d. Polymorphism
7. If the class Dog inherits the properties of the class Animal then which of the following is the name given to the Dog class?
a. Superclass b. Subclass
c. Child class d. Both b and c
8. Which of the following is the main purpose of data abstraction?
a. Hiding essential information b. Reducing the complexity of a program
c. Using properties of another class d. None of these
9. Which of the following is the meaning of poly in the word polymorphism?
a. Many b. Forms
c. Many forms d. One form
10. A capsule is related to which of the following principles of object-oriented programming?
a. Inheritance b. Polymorphism
c. Encapsulation d. Data abstraction
11. What is a program?
a. A set of instructions or code written to perform a specific task when executed by a computer.
b. The process of designing, writing, testing, and maintaining code.
c. A person who writes, tests, and maintains code to create software programs.
d. A formal language comprising a set of instructions used to communicate with computers.
12. Which of the following statements best defines encapsulation?
a. It enables the creation of complex data types where only relevant information and functionalities are exposed.
b. It allows objects to be treated as instances of their parent class or as instances of their own class.
c. It involves bundling data and methods within a class, allowing for data hiding and controlled access.
d. It allows a class to inherit attributes and methods from another class.
13. Why data abstraction is important in programming?
a. To bundle data and methods within a class.
b. To enable the creation of complex data types.
c. To hide the internal state of an object and restrict access to it.
d. To focus on what an object does rather than how it achieves it.
14. Inheritance in object-oriented programming allows:
a. Objects to be treated as instances of their parent class or as instances of their own class.
b. A class to inherit attributes and methods from another class.
c. Bundling data and methods within a class.
d. Different classes to be treated through a unified interface.
15. What is the core concept of polymorphism in object-oriented programming?
a. It enables the creation of complex data types where only relevant information and functionalities are exposed.
b. It allows objects to be treated as instances of their parent class or as instances of their own class.
c. It involves bundling data and methods within a class, allowing for data hiding and controlled access.
d. It allows different classes to be treated through a unified interface.
16. What is the primary goal of reusability in object-oriented programming?
a. To increase code complexity
b. To decrease code modularity
c. To promote code duplication
d. To enhance code reuse and maintainability
17. Which OOP principle facilitates code reuse by allowing classes to inherit attributes and methods from other classes?
a. Encapsulation b. Polymorphism
c. Abstraction d. Inheritance
19 19 Introduction to Object-Oriented Programming Concepts 19
19

