• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 12 páginas
Examen

Object Oriented Programming Test Questions with Correct Answers 100% Solved

Document preview thumbnail
Vista previa 2 fuera de 12 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
26 de febrero de 2025
Número de páginas
12
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$10.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
TutorJosh
3.5
(78)
Vendido
511
Seguidores
16
Artículos
33245
Última venta
6 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes