Question: Inheritance Part I: Create a class called Video. This class should have: - Two properly encapsulated instance variables: A String called title and an integer

Inheritance
Part I: Create a class called Video. This class should have:
- Two properly encapsulated instance variables: A String called title and an integer called awardsWon.
- One constructor, which takes 2 parameters and sets the instance variables.
- Getters for both the instance variables.
Part II: Create a class called TVShow that inherits from Video. This class should have:
- Two properly encapsulated instance variables: An integer called numEpisodes and an integer called startYear.
- One constructor, which takes 4 parameters and sets the superclass and class instance variables.
- A method named printInfo that does not take any parameters and does not return anything. It should print out the values of all 4 of the instance variables - be careful accessing the superclass instance variables! The values should print the instance variable name then the value.
Inheritance Part I: Create a class called Video.

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 Programming Questions!