Question: (a) Design and implement a java class named Movie with following. Instance variables: title (string), name_of_Director (string). Methods: Specific constructor to receive parameters for all

(a) Design and implement ajava classnamedMoviewith following.

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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Here are the Java classes based on your requirements a Movie class java public class Movie ... View full answer

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!