(a) Design and implement a java class named Movie with following. Instance variables: title (string), name_of_Director (string)....
Question:
Instance variables:title (string), name_of_Director (string).
Methods:
- Specific constructor to receive parameters for all instance variables.
- get and set methods of private variables (as needed).
- toString() that returns a string of contents: title and name_of_Director.
(b) Design and implement ajava classnamedComedyMoviewhich "is a" Movie with the following.
Instance variables:ticket_price (double).
Methods:
- Specific constructor to receive parameters for all instance variables.
- get and set methods of private variables (as needed).
- toString() that returns a string of contents: title, name_of_Director, and ticket_price.
(c) Design and implement ajava classnamedActionMoviewhich "is a" Movie with the following.
Instance variables:ticket_price (double).
Methods:
- Specific constructor to receive parameters for all instance variables.
- get and set methods of private variables (as needed).
- toString() that returns a string of contents: title, name_of_Director, and ticket_price.
(d) Design and implement ajava classnamedSpyActionMoviewhich "is an" ActionMovie with the following.
Instance variables:ticket_price (double).
Methods:
- Specific constructor to receive parameters for all instance variables.
- get and set methods of private variables (as needed).
- toString() that returns a string of contents: title, name_of_Director, and ticket_price.
(e) Design and implement ajava program classnamedMovieDriver. The main() method should create an array of 3 movies as follows:
- Action movietitle = Outlawed, Director = Adam Collins, Ticket price = $10.00
- Spy action movietitle = Cloak and Dagger, Director = Fritz Lang, Ticket price = $12.00
- Comedy movie= Bridesmaids, Director = Paul Feig, Ticket price = $8.00
The main() should print the following.
Submission instructions:
Please submit all classes one after another in the same answer-textbox by cut/paste or by directly coding into the answer-textbox.
Process Dynamics And Control
ISBN: 978-0471000778
2nd Edition
Authors: Dale E. Seborg, Thomas F. Edgar, Duncan A. Mellich