100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Object Oriented Programming Test Questions with Correct Answers 100% Solved

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
26-02-2025
Written in
2024/2025

Object Oriented Programming Test Questions with Correct Answers 100% Solved Inheritance - Answers Single inheritance - Answers enables a derived class to inherit properties and behavior from a single parent class. Multiple inheritance - Answers When a class is derived from multiple base classes Multi-level inheritance - Answers Hybrid inheritance - Answers Use of multiple types of inheritance Function overloading - Answers The ability of two functions with the same name but different parameters to exist in the same program or class. Templates - Answers A formula or blueprint for creating a generic class or a function Function of a constructor - Answers Initializes an object Object - Answers instance of a class Function of Destructor - Answers To free the memory consumed by program Polymorphism - Answers The ability of a variable, variable or object to take on multiple forms Enum - Answers Difference between structure and union - Answers Union is more memory centric Exception - Answers error condition that can occur during the normal course of program execution; exception is thrown Try Catch Block - Answers An exception handling process in programming where possible error generating situations are smoothly handled during execution, with the situation is enclosed inside the try section, and one or more catches are built in to handle the possible errors that may occur. This is a key feature in making very large programs robust and error free. Handling of runtime error - Answers Exception handling inline function - Answers Member functions defined inside the integration of the class A-D-T - Answers Abstract Data Type. It's a type of secondary or derived data type Abstraction - Answers A definiton that captures general characteristics Procedural Programming (POP) - Answers uses variables to store data, focuses on the process/functions that occur in a program. Data and functions are seperate and distinct Object-oriented programming (OOP) - Answers Based on objects that encapsulate the data and the functions that operate on and with the data :: - Answers Scope resolution operator (not overloadable) Syntax resolution operator syntax - Answers Class-name <scope resolution> object name Why use Object Oriented Programming? - Answers To solve and avoid the problem with data security in POP Object - Answers Software entity that combines data and functions that act on the data in a single unit Attributes - Answers The data items of an object in member variable should Class - Answers a programmer-defined data type Member functions (methods) - Answers procedures/functions that act on the attributes of the class Data hiding - Answers Restricting data access to certain members of an object. The intent is to allow only member functions to directly access and modify the object's data Encapsulation - Answers The building of a object's data and procedures into a single entity. Access specifier - Answers Used to control accesst to members of the class Member functions - Answers Accessor, mutator Standard structure of a program - Answers 1. Interface - all prototypes and header files 2. Implementation - all function definitions 3. Client-code - Standard structure of an OOP program - Answers 1. Class specification file - class.h 2. Class implementation file - 3. Client-code file - Use of scope resolution operator (::) - Answers data-type class-name :: member-function(){ //function definition ; } used in class implementation file

Show more Read less
Institution
Object Oriented Programming
Course
Object Oriented Programming









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Object Oriented Programming
Course
Object Oriented Programming

Document information

Uploaded on
February 26, 2025
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Object Oriented Programming Test Questions with Correct Answers 100% Solved

Inheritance - Answers

Single inheritance - Answers enables a derived class to inherit properties and behavior from a single
parent class.

Multiple inheritance - Answers When a class is derived from multiple base classes

Multi-level inheritance - Answers

Hybrid inheritance - Answers Use of multiple types of inheritance

Function overloading - Answers The ability of two functions with the same name but different
parameters to exist in the same program or class.

Templates - Answers A formula or blueprint for creating a generic class or a function

Function of a constructor - Answers Initializes an object

Object - Answers instance of a class

Function of Destructor - Answers To free the memory consumed by program

Polymorphism - Answers The ability of a variable, variable or object to take on multiple forms

Enum - Answers

Difference between structure and union - Answers Union is more memory centric

Exception - Answers error condition that can occur during the normal course of program execution;
exception is thrown

Try Catch Block - Answers An exception handling process in programming where possible error
generating situations are smoothly handled during execution, with the situation is enclosed inside the
try section, and one or more catches are built in to handle the possible errors that may occur. This is a
key feature in making very large programs robust and error free.

Handling of runtime error - Answers Exception handling

inline function - Answers Member functions defined inside the integration of the class

A-D-T - Answers Abstract Data Type. It's a type of secondary or derived data type

Abstraction - Answers A definiton that captures general characteristics

Procedural Programming (POP) - Answers uses variables to store data, focuses on the process/functions
that occur in a program. Data and functions are seperate and distinct

, Object-oriented programming (OOP) - Answers Based on objects that encapsulate the data and the
functions that operate on and with the data

:: - Answers Scope resolution operator (not overloadable)

Syntax resolution operator syntax - Answers Class-name <scope resolution> object name

Why use Object Oriented Programming? - Answers To solve and avoid the problem with data security in
POP

Object - Answers Software entity that combines data and functions that act on the data in a single unit

Attributes - Answers The data items of an object in member variable should

Class - Answers a programmer-defined data type

Member functions (methods) - Answers procedures/functions that act on the attributes of the class

Data hiding - Answers Restricting data access to certain members of an object. The intent is to allow only
member functions to directly access and modify the object's data

Encapsulation - Answers The building of a object's data and procedures into a single entity.

Access specifier - Answers Used to control accesst to members of the class

Member functions - Answers Accessor, mutator

Standard structure of a program - Answers 1. Interface - all prototypes and header files

2. Implementation - all function definitions

3. Client-code - main.cpp

Standard structure of an OOP program - Answers 1. Class specification file - class.h

2. Class implementation file - class.cpp

3. Client-code file - main.cpp

Use of scope resolution operator (::) - Answers data-type class-name :: member-function(){

//function definition ;

}



used in class implementation file

Class conventions - Answers 1. member variables are private

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TutorJosh Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
317
Member since
1 year
Number of followers
16
Documents
27862
Last sold
2 hours ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.6

50 reviews

5
16
4
14
3
11
2
0
1
9

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions