Question: WEEK 4: KNOWLEDGE CHECK QUIZ INSTRUCTIONS (CO 4) When you look at applications, some relationships are has-a relationships meaning objects are ____________ of other objects
WEEK 4: KNOWLEDGE CHECK
QUIZ INSTRUCTIONS
(CO 4) When you look at applications, some relationships are has-a relationships meaning objects are ____________ of other objects
Group of answer choices
1. assignments
2. unknown
3. aggregates
4.functions
Question 22 pts
(CO 4) In the following car class, what data member declaration illustrates composition: class Car { private: // attributes string model; int year; Engine en;
double price; public: // constructors Car() { model = "unknown"; year = 0; price = 0.0; } };
Group of answer choices
price
en
model
year
(CO 4) Which of the following is not a benefit of composition?
it reduces complexity of a class
It allows reuse of a class in other contexts
It improves testing and troubleshooting
upgrading a class that is an aggregate of another class can never be done.
Question 42 pts
(CO 4) An instance of a class is also known as a(n) _____________.
Group of answer choices
terminate
behavior
class
object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
