Question: Create a Java class file for a Movie class. ( a ) In the File menu select New File... ( b ) Under Categories: make

Create a Java class file for a Movie class.(a) In the File menu select New File...(b) Under Categories: make sure that Java is selected.(c) Under File Types: make sure that Java Class is selected.(d) Click Next.(e) For Class Name: type Movie.(f) For Package: select csci2011.yourlastnamelab1.(g) Click Finish.(h) A text editor window should pop up with the following source code (except with your actual name): package csci2011. yourlastnamelab1;/**** @author Your Name*/public class Movie {}3. Implement the Movie class.(i) Add the following private instance variables to the Movie class: An instance variable called title of type String. An instance variable called director of type String. An instance variable called year of type int.(j) Add the following methods to the Movie class: A void method called initialize that takes two Strings and an int as arguments, and uses those arguments to set the values of the title, director, year instance variables. A void method called display that displays the title and director of the movie followed by the year in parentheses. For example, if the title of the movie is Blade Runner, the director is Ridley Scott and the year is 1982, it should display Blade Runner dir. Ridley Scott (1982). Accessor methods (getters) for each instance variable. Mutator methods (setters) for each instance variable.(k) In the main function of your main class, remove the line that prints Hello World to the output screen and then create a Movie object and perform the following unit tests: Initialize the movie object with a title, director and year of your choice, and display it. Your output might look like this: Testing initialize and display:Blade Runner dir. Ridley Scott (1982) For each instance variable use the corresponding mutator to change the value, then use the accessor to make sure that the value changed. Your output for getTitle and setTitle might look like this: Testing setTitle and getTitle:getTitle returns: Blade Runnercalling setTitle with argument: BrazilgetTitle returns: Brazil(l) Run the main program to see if the tests were successful.(m) Add an equals method to the Movie class that takes a Movie object as an argument and returns true if the argument has the same title, director, and year as the current object. Remember to use the equals method of the String class to compare the two titles.(n) Add code in your main method in your main class that performs the following unit tests: Create two movies with different titles, but the same director and year, and test if they are the same using equals. Your output might look like this: Testing equals on different titles, same director and yearThe Wasp Woman dir. Roger Corman (1959)A Bucket of Blood dir. Roger Corman (1959)equals returns false Create two movies with the same title and director, but different years and test if they are the same using equals. Your output might look like this: Testing equals on different years, same title and directorHalloween dir. John Carpenter (1978)Halloween dir. John Carpenter (2007)equals returns false Create two movies with the same title, director, and year, and test to see if they are the same using both == and equals. Your output might look like this: Testing equals and == on objects with the same dataSuspiria dir. Dario Argento (1977)Suspiria dir. Dario Argento (1977)equals returns true== returns false Declare a variable of type Movie and set it equal to one of the previous Movie objects you created. Compare the new variable and the one you set it equal to using both == and equals Your output might look like this: Testing equals and == on references to the same objectPhantasm dir. Don Coscarelli (1979)Phantasm dir. Don Coscarelli (1979)equals returns true== returns true

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