Question: home / study / engineering / computer science / computer science questions and answers / 1. constructor is executed when _____. (5 points) an object

home / study / engineering / computer science / computer science questions and answers / 1. constructor is executed when _____. (5 points) an object is created an object is used a ...

Your question has been answered

Let us know if you got a helpful answer. Rate this answer

Question: 1. Constructor is executed when _____. (5 points) an object is created an object is used a class ...

1. Constructor is executed when _____. (5 points)

an object is created

an object is used

a class is declared

an object goes out of scope

2. Write the declaration for a class called dog that contains two private data members: a string called breedand an int called age. Then include a default public constructor which will initialize the value breed to bulldog and age to 2. (15 points)

3. Explain with the help of a pseudo-code the purpose of public: and private: access specifiers in a class definition. (10 points)

4. Explain the concept of operator overloading with the help of a C++ pseudo-code. (20 points)

5. State the properties of a Constructor that distinguishes it from other functions. (10 points)

6. State and very briefly explain the three distinct properties of Object Oriented Programming paradigm. (10 points)

7. Explain the concepts of a friend function with the help of a C++ pseudo-code. (10 points)

8. The following generalization: The number of input arguments required for an overloaded operator function definition is one less than the number of the operands required for its operation, is true only when ___________ ? (5 points)

9. Friend functions are member functions of the class it is friends with. (True or False?) (5 points)

10. State the properties of accessor and mutator (i.e. getters and setters) functions which can be used to generalize their declarations. (10 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!