Which among the following is the best situation to use upcasting?
(a) For general code dealing with only subtype
(b) For general code dealing with only supertype
(c) For general code dealing with both the supertype and subtype
(d) For writing a rigid code with respect to subtype
The question was posed to me in an interview for job.
This is a very interesting question from Upcasting in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming