OOPS Quiz (Set 2) OOPS (Set 2) 1 / 10 What does the term 'overloading' mean in OOP? Creating multiple constructors for a class Creating multiple instances of a class Defining a new subclass Defining a new method in a superclass 2 / 10 What is the purpose of an interface in OOP? To define a blueprint for a class and its methods To provide a way to access private members of a class To define a contract for classes that implement it, specifying the methods they must have To define a new data type 3 / 10 What does the term 'constructor' refer to in OOP? A method that is used to access private members of a class A method that is used to create instances of a class A method that is used to override a superclass method A method that is used for type casting 4 / 10 What is method overriding in OOP? Creating a new method with the same name in a subclass Creating a new class with the same name as an existing one Calling a method from another method Defining multiple constructors for a class 5 / 10 What is the purpose of an abstract class in OOP? To create an instance of a class To define a blueprint for other classes to inherit from To encapsulate data and methods To perform method overloading 6 / 10 What is polymorphism in OOP? A technique for combining data and methods The process of hiding the implementation details and showing only the essential features of an object The ability of different objects to respond to the same method in a way that is specific to their class The process of creating multiple objects from a class 7 / 10 What is the main purpose of the 'super' keyword in OOP? To call the constructor of the parent class To define a new instance of a class To create a subclass To access private methods of a class 8 / 10 Which OOP principle promotes the idea of binding data and methods that operate on the data into a single unit? Polymorphism Encapsulation Inheritance Abstraction 9 / 10 In OOP, what does the term 'inheritance' refer to? Creating multiple instances of a class Copying data from one object to another Creating new classes from existing ones, inheriting their attributes and behaviors Passing arguments to methods 10 / 10 What is encapsulation in object-oriented programming? A process of creating objects from classes A technique for combining data and methods into a single unit A way to perform multiple inheritance A mechanism to override methods in a subclass Your score isThe average score is 0% 0% Restart quiz