ed and running time through parameters and assign these to the class variables. Create an abstract set method for the price of a DVD; also create get methods for the variables. Create a subclass InstructionalDVD that extends the DVD class and implements an iPrintable interface. The interface that must be added is shown below: public interface iPrintable { Stri

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Design a console program that will print details of DVDs available to buy. Make use of an abstract class DVD with variables that will store the title, yearReleased, running time and price of a DVD. Create a constructor that accepts the title, yearReleased and running time through parameters and assign these to the class variables. Create an abstract set method for the price of a DVD; also create get methods for the variables.
Create a subclass InstructionalDVD that extends the DVD class and implements an iPrintable interface. The interface that must be added is shown below:
public interface iPrintable { String ShowDetails();
}
The InstructionalDVD subclass has a private variable named category for which a get method must be written. The constructor of the InstructionalDVD class must accept the title, yearReleased, running time and category through parameters. Write the code for the setPrice() and ShowDetails() methods.
Write a useDVD class and instantiate 2 objects of the InstructionalDVD class

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,