Home > Object Oriented Programming > Quizzes > Object Oriented Programming Practice Test: Classes
Object Oriented Programming Practice Test: Classes
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 89% Most missed: “How many derived class can a single base class have?”
Quiz on abstract class, template class, base class, derived class and class usage. In object-oriented programming (OOP), a class is a template that defines the methods and variables for a specific type of object. A class is a blueprint for creating objects, providing initial values for state (member variables), and implementations of behavior (member functions or methods).  A class can have subclasses that inherit some or all of the class's characteristics. The class becomes the superclass for each subclass.  For example, a cat object may have attributes like breed, age, and fur color. A... Show more
Object Oriented Programming Practice Test: Classes
Time left 00:00
25 Questions

1. If a base class is being derived by two other classes, which inheritance will that be called?
2. It is _________________________ to have an abstract method.
3. The members of a derived class can never be derived.
4. Which feature is exhibited by the inbuilt classes?
5. Which among the following is an important use of abstract classes?
6. If a base class is inherited from another class and then one class derives it, which inheritance is shown?
7. Can we call methods of base class using the constructor of the derived class?
8. If a class is extending/inheriting another abstract class having abstract method, then _______________________
9. What is the syntax to use explicit class specialization?
10. If there is a derived class in a program, how many classes must be in that program?
11. If a database have to be maintained using OOP, to store the details of each employee in a company, which would be the best choice among the following?
12. How many derived class can a single base class have?
13. If a base class is added with a few new members, its subclass must also be modified.
14. What is the use of inbuilt classes?
15. Which among the following must be in a base class?
16. An abstract class is always a __________ class.
17. How many base classes can a single derived class have in C++?
18. Deriving a class in such a way that that the base class members are not available for further inheritance is known as ___________________
19. Can abstract class have main() function defined inside it?
20. Which among the following is inherited by a derived class from base class?
21. Abstract class can’t be final in java.
22. To group all the brands of cars, what should be used?
23. Why do classes use mutator methods?
24. What are the two specializations of I/O template classes in C++?
25. If template class is defined, is it necessary to use different types of data for each call?