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

Using a Word document respond to the following questions: 1. True or false quest

ID: 3673985 • Letter: U

Question

Using a Word document respond to the following questions:

1. True or false questions

a) The member variables of a class must be of the same type.
b) The member functions of the class must be public.
c) A class can have more than one constructor.
d) A class can have more than one destructor.
e) Both constructors in destructors can have parameters.

2. What are the built in operations on a class?
3. What is the main difference between struct and a class?
4. Explain why you would need both public and private members in a class.
5. What is a constructor? Why would you include a constructor in a class?
6. Which of the following characters appears before a destructors name?

a. # b. ! c. ~ d. $

7. What is a destructor and what it is its purpose?

Assignment Requirements:

After completing your research for each question, use a Word document that includes each question number along with its response. Use a Word table with two columns, question # and your response (see table below).

Question # Researched Response

Explanation / Answer

1.
(a) False
(b) False
(c) True
(d) False
(e) False

2.
. & ==

3.
The members of a struct are public by default, but private in the case if a class.

4.
We would need both because we may want to have some members which we can't allow execution from outside a class, and other variables which we can allow execution from outside the class.

5.
A constructor is a methos having the name same as that of the class name, and executes as soon as an instance of a class is created.

6.
c. ~

7.
A destructor is a member function that is called when the lifetime of an object ends. The purpose of the destructor is to free the resources that the object may have acquired during its lifetime

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