Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ Programming: True or False 1) Class is the blueprint and object is the thing

ID: 3583739 • Letter: C

Question

C++ Programming: True or False

1)     Class is the blueprint and object is the thing. Object is an instance of a class. (This question might be messed up. Seems to be two separate questions included by mistake on my form, but I'm not completely sure)

2)     Constructor is a special function that will be automatically invoked upon the destruction of the object.

3)     The job of the constructor is to perform the setup that an object needs.

4)     Every class must have unique names for its data and functions.

5)     The three pillars of object-oriented program are data abstraction, class, and inheritance.

Explanation / Answer

Question No-1:

Class is the blueprint and object is the thing. Object is an instance of a class

ans: Both statment are TRUE

-----------------------------------------------------------------------------------

Question No-:2:

Constructor is a special function that will be automatically invoked upon the destruction of the object.

Answer: FALSE

Comstructor is called when object in created.

----------------------------------------------------------------------------

Question no-3

The job of the constructor is to perform the setup that an object needs.

Answer : TRUE

-----------------------------------------------------------

Question no-4

Every class must have unique names for its data and functions.

Answer: FALSE

A class has unique name for its data. . but a class can contains multple functions with same name .

Object oriented programs has a feature called function overloading . means we can use multiple functions with same name .type of argument and number of argument are diffrerent.means function name is not inique.

------------------------------------------------------------------------

question-5:

The three pillars of object-oriented program are data abstraction, class, and inheritance

Answer: FALSE

three pillars are data abstraction, encapsulation, and inheritance

As encapsulation is achieved by means of class. class may be used as a broader sense.

As encapsulation is generally mean to data hiding.Only declaring a class does not provide hiding unless the data members are declared private.

So class should be replaced by encapsulation

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote