Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

I need reasonably brief, but complete answers for the following few .docx

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio

Eche un vistazo a continuación

1 de 1 Anuncio

I need reasonably brief, but complete answers for the following few .docx

Descargar para leer sin conexión

I need reasonably brief, but complete answers for the following few questions that I am stuck on.

1.a) Suppose class Y is derived from class X.  Each class declares
    a constructor and a destructor.  Class Y has a string member 
    object that has a constructor and destructor. In what order do 
    the three constructors and destructors run when instances of 
    class Y are created and destroyed?

    b) Should X's destructor be declared virtual? Why or why not, 
    and what difference would it make?

2. What is a pure virtual function?  Why would you define a pure
    virtual function? Give an example of a pure virtual function.

3. What is an abstract base class?  What does it do? Why would you
    make a class abstract?

4. What are the advantages of using an stl::string to hold character
    data vs. a dynamic char array?
.

I need reasonably brief, but complete answers for the following few questions that I am stuck on.

1.a) Suppose class Y is derived from class X.  Each class declares
    a constructor and a destructor.  Class Y has a string member 
    object that has a constructor and destructor. In what order do 
    the three constructors and destructors run when instances of 
    class Y are created and destroyed?

    b) Should X's destructor be declared virtual? Why or why not, 
    and what difference would it make?

2. What is a pure virtual function?  Why would you define a pure
    virtual function? Give an example of a pure virtual function.

3. What is an abstract base class?  What does it do? Why would you
    make a class abstract?

4. What are the advantages of using an stl::string to hold character
    data vs. a dynamic char array?
.

Anuncio
Anuncio

Más Contenido Relacionado

Más de heathmirella (20)

Más reciente (20)

Anuncio

I need reasonably brief, but complete answers for the following few .docx

  1. 1. I need reasonably brief, but complete answers for the following few questions that I am stuck on. 1.a) Suppose class Y is derived from class X. Each class declares a constructor and a destructor. Class Y has a string member object that has a constructor and destructor. In what order do the three constructors and destructors run when instances of class Y are created and destroyed? b) Should X's destructor be declared virtual? Why or why not, and what difference would it make? 2. What is a pure virtual function? Why would you define a pure virtual function? Give an example of a pure virtual function. 3. What is an abstract base class? What does it do? Why would you make a class abstract? 4. What are the advantages of using an stl::string to hold character data vs. a dynamic char array?

×