OOPS Quiz (Set 3) OOPS (Set 3) 1 / 10 What is the difference between a class variable and an instance variable? A class variable is a variable that is shared by all methods of a class, while an instance variable is a variable that is unique to each method of a class A class variable is a variable that is shared by all instances of a class, while an instance variable is a variable that is unique to each instance of a class A class variable is a variable that is shared by all functions of a class, while an instance variable is a variable that is unique to each function of a class 2 / 10 What is a destructor? A destructor is a function that is called when an object is destroyed A destructor is a method that is called when an object is modified A destructor is a method that is called when an object is destroyed 3 / 10 What is a constructor? A constructor is a method that is called when an object is created A constructor is a function that is called when an object is created A constructor is a method that is called when an object is modified 4 / 10 What is a method? A method is a function that is defined within a module A method is a function that is defined within a class A method is a function that is defined within a program 5 / 10 What is an object? An object is a blueprint for creating classes An object is an instance of a class An object is a blueprint for creating variables 6 / 10 What is a class? A class is a blueprint for creating functions A class is a blueprint for creating variables A class is a blueprint for creating objects 7 / 10 What is inheritance? Inheritance is the ability of an object to have multiple implementations Inheritance is the ability of an object to inherit the properties and methods of another object Inheritance is the ability of an object to have multiple arguments 8 / 10 What is polymorphism? Polymorphism is the ability of an object to take on different forms Polymorphism is the ability of an object to have multiple implementations Polymorphism is the ability of an object to have multiple arguments 9 / 10 What is encapsulation? Encapsulation is the process of hiding the implementation details of an object from the outside world Encapsulation is the process of making an object's data and methods public Encapsulation is the process of making an object's data and methods private 10 / 10 What is the difference between an abstract class and an interface? An abstract class can have methods, while an interface can only have methods An abstract class can have data, while an interface can only have methods An abstract class can have functions, while an interface can only have methods Your score isThe average score is 0% 0% Restart quiz