Question: Suppose you define a function that takes a reference to a base-class object as an argument. Why can this function also use a derived-class object

Suppose you define a function that takes a reference to a base-class object as an argument. Why can this function also use a derived-class object as an argument?

Step by Step Solution

3.40 Rating (172 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This function can also use a derivedclass object as an argument because of the ... View full answer

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 Introduction Java Program Questions!