Question: Help on these C plus plus Q. What does composition mean? That a class contains an attribute that references an object rather than a primitive
Help on these C plus plus
Q. What does composition mean?
That a class contains an attribute that references an object rather than a primitive type.
That a subclass extends a superclass.
That a superclass pointer is pointing to a subclass object.
That attributes should be declared private.
_____________________________________
Q. Which of the following statements is FALSE?
"class A : public B" means B is a subclass of A
A subclass is usually extended to contain more functions and more detailed information than its superclass.
"class A : public B" means A is a subclass of B
A subclass object can be used in any place a superclass object is expected.
_______________________________________
Q. Which of the following statements is FALSE?
If a function overloads another function , these two functions must have the same signature.
A subclass can overload a function of its parent class
If a function overrides another function , these two functions must have the same signature.
A function can be overloaded in the same class.
_________________________________________
Q.Object-oriented programming allows you to derive new classes from existing classes. This is called ____.
encapsulation
composition
abstraction
inheritance
__________________________________________
Q. Polymorphism is based on the fact that ____.
A class can contain objects of other classes.
A class can extend another class.
Attributes are usually private.
A superclass pointer can point to a subclass object.
______________________________________
Q. What is the most suitable relationship between Employee and Faculty?
Composition
Aggregation
There is no relationship between these classes.
Inheritance
_______________________________________
Q. Which of the following statements is true?
A subclass is usually extended to contain more functions and more detailed information than its superclass.
"class A : public B" means that class B is a subclass of A
A subclass is a class whose object is in a composition relationship with another class.
A subclass is a subset of a superclass.
____
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
