Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

VU Past Papers CS304-Object Oriented Programming (OOP) Short Questions & Answers

1. What is Abstraction?

Answer: Abstraction is the process of hiding unnecessary details and showing only the essential features of an object. It focuses on what an object does rather than how it works.

2. What is a Class Diagram?

Answer: A class diagram describes the structure of a system by showing classes, their attributes, methods, and the relationships between them.

3. What is Method Overriding?

Answer: Method overriding is when a subclass provides its own implementation of a method that already exists in the superclass with the same name and parameters.

4. What is Operator Overloading?

Answer: Operator overloading is the ability to give different meanings to the same operator depending on the data types used with it.

5. What is Method Overloading?

Answer: Method overloading is defining multiple methods with the same name in a class but with different parameters (number or type).

6. What is Polymorphism?

Answer: Polymorphism means “many forms”. It allows a single function or operator to behave differently depending on the context.

7. What is Inheritance?

Answer: Inheritance is the ability of one class to acquire properties and methods from another class.

8. What is a Base Class?

Answer: A base class is the class whose properties and methods are inherited by another class. It is also called the parent class.

9. What is a Concrete Class?

Answer: A concrete class is a class that can be instantiated directly to create objects because it contains complete implementations of its methods.

10. What are Data Members?

Answer: Data members are variables declared inside a class that store data related to objects.

11. What is a Constructor?

Answer: A constructor is a special member function that initializes an object when it is created.

12. What is a Destructor?

Answer: A destructor is a special member function that is automatically called when an object is destroyed to release resources.

13. What is a Global Variable?

Answer: A global variable is a variable that can be accessed from anywhere in the program.

14. What is a Local Variable?

Answer: A local variable is declared inside a function and can only be accessed within that function.

15. What is a Null Pointer?

Answer: A null pointer is a pointer that does not point to any valid memory location.

16. What is a Pointer?

Answer: A pointer is a variable that stores the memory address of another variable.

17. What is Protected in C++?

Answer: Protected members can be accessed within the class and by derived classes but not by other parts of the program.

18. What is OOP?

Answer: Object-Oriented Programming (OOP) is a programming paradigm that organizes programs using objects and classes.

19. What are the Elements of OOP?

Answer: The main elements are Object, Class, Method, Encapsulation, Information Hiding, Inheritance, and Polymorphism.

20. What are the Characteristics of OOP?

Answer:

  • Emphasis on data rather than procedures
  • Programs divided into objects
  • Data hiding and encapsulation
  • Reusability through inheritance
  • Communication between objects

21. What are the Basic Concepts of OOP?

Answer:
Object, Class, Abstraction, Encapsulation, Inheritance, Polymorphism, Message Passing, and Dynamic Binding.

22. What is an Object?

Answer: An object is an instance of a class that contains data and functions.

23. What is Encapsulation?

Answer: Encapsulation is the process of wrapping data and functions together into a single unit (class).

24. What is Information Hiding?

Answer: Information hiding means restricting direct access to some data and showing only necessary information.

25. What is a Class?

Answer: A class is a blueprint or template used to create objects.

26. What is a Meta-Class?

Answer: A meta-class is a class whose objects are themselves classes.

27. What is Object-Based Programming?

Answer: Object-based programming uses objects but does not support inheritance and polymorphism.

28. What is the Difference Between Object-Based and Object-Oriented Programming?

Answer:

  • Object-Based: Uses objects but no inheritance or polymorphism.
  • Object-Oriented: Uses objects, inheritance, and polymorphism.
Contents Copyrights Reserved By T4Tutorials