Which one of the following statements is true? Question 2 options: An object of
ID: 3907404 • Letter: W
Question
Which one of the following statements is true?
Question 2 options:
An object of the derived class is NOT an object of its base class.
An object of the base class is both an object of the base class and the derived class.
An object of the base class is NOT an object of a derived class.
Either an object of the base class or its derived class can be instantiated, but not both.
Save
An object of the derived class is NOT an object of its base class.
An object of the base class is both an object of the base class and the derived class.
An object of the base class is NOT an object of a derived class.
Either an object of the base class or its derived class can be instantiated, but not both.
Explanation / Answer
An object of the base class is NOT an object of a derived class.
Then Derived is a Base, but Base is not a Derived.
Derived d;
Base b = d; // It's Ok
Base b;
Derived d = b; //Not Ok
here we can not assign the base object to derived class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.