Question: A class named Actor extends class Movie and both classes have a method called getName ( ) that contains different code. An actor object tomCrui

A class named Actor extends class Movie and both classes have a method called getName () that contains different code. An actor object tomCrui se and a movie object missionImpossible have been created. Assume tomcruise gets assigned to missionImpossible
(i.e. missionImpossible = tomCruise) and we call missionImpossible. getName (), the code inside of the getName () method in the Actor class will be executed
To get a polymorphic operation as described above, which of the following must be true.
(Select all that apply)
The getName() method must be a member of the subclass: Actor
-The getName() method must be a member in the superclass: Movie
The superclass and subclass method signatures must be the same
The superclass and subclass method return types must be the same.
 A class named Actor extends class Movie and both classes have

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!