Question: In Java you have a class called Video with an abstract method called showVideo() in it, and a constructor that takes a name of a
In Java you have a class called Video with an abstract method called showVideo() in it, and a constructor that takes a name of a movie as a string.
You have a class called FullVideo with a showVideo() method and a second class called PodCastVideo with a showVideo() method too. Both FullVideo and PodCastVideo inherit from the Video class and both have constructors that take a name of a movie as a string.
Define a main method to test the above classes. Inside the main method, create an array or ArrayList of 2 Videos and put one FullVideo object and one PodCastVideo object in the array or ArrayList called playlist with names of movies you like. Then loop through the array or ArrayList and polymorphicly call the showVideo() method to show both videos.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
