• ¿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 4 fuera de 52 páginas
Examen

C++ Final.

Document preview thumbnail
Vista previa 4 fuera de 52 páginas

Exam of 52 pages for the course Cs2 at Cs2 (C++ Final)

Vista previa del contenido

C++ Final GRADE A QUESTIONS WITH ANSWER
Which of the following is true about inheritance?
Select one:

a.

All public member functions of the base class become the public member functions of
the derived class.

b.

All public member variables of the base class become the public member variables of
the derived class.

c.

The public member variables of the base class become the public or private member
variables of the derived class.

d.

All public members of the base class become the public members of the derived class. -
(correct answer)The public member variables of the base class become the public or
private member variables of the derived class.



Suppose that bClass is a class. Which of the following statements correctly derives the
class dClass from bClass?

Select one:

a.
class dClass:: protected bClass

{

//classMembersList

};

b.

class dClass: private bClass

{

//classMembersList

,};

c.

class bClass: public dClass

{

//classMembersList

};

d.

class dClass:: public bClass
{

//classMembersList

}; - (correct answer)class dClass: private bClass

{

//classMembersList

};



A call to the base class's constructor is specified in the heading of the definition of a
derived class constructor.

Select one:

True

False - (correct answer)True


The ____ members of an object form its internal state.

Select one:
a.static

b.protected

c.private

d.public - (correct answer)private

,Inheritance is an example of a(n) ____ relationship.

Select one:

a.has-a

b.handshaking

c.is-a

d.had-a - (correct answer)is-a


The private members of a base class can be directly accessed by a derived class.

Select one:

True

False - (correct answer)False



To ____ a public member function of a base class in the derived class, the
corresponding function in the derived class must have the same name, number, and
types of parameters.

Select one:

a.

rename

b.
redefine

c.

reuse
d.

overload - (correct answer)redefine



____ is the ability to use the same expression to denote different operations.
Select one:

, a.

Inheritance

b.

Encapsulation

c.

Composition

d.

Polymorphism - (correct answer)polymorphism


If the corresponding functions in the base class and the derived class have the same
name but different sets of parameters, then this function is ____ in the derived class.

Select one:

a.

overloaded

b.

reused

c.

redefined

d.

overridden - (correct answer)overloaded


If the derived class does not override a public member function of the base class, you
may specify a call to that public member function by using the name of the function and
the appropriate parameter list.

Select one:

True

False - (correct answer)True

Información del documento

Subido en
26 de octubre de 2024
Número de páginas
52
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.49

¿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
douglasmugwe82
5.0
(1)
Vendido
2
Seguidores
0
Artículos
4215
Última venta
1 año 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