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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started