Question: Polymorphism this question is about polymorphism. Select one or more: Polymorphism allows writing code that works for different subtypes of a type Mammal v=new Dog();
this question is about polymorphism. Select one or more: Polymorphism allows writing code that works for different subtypes of a type Mammal v=new Dog(); v.move(); could be an example of polymorphism Vehicle v=new Vehicle(); v.accellerate(); is an example of polymorphism Polymorphism doesn't require inheritance To use polymorphism we only need the substitution principle The substitution principle allows an object to have a super type
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
