Question: Create a class called Movie with the following instance variables and methods. The instance variables are: namea string . director a string year an integer

Create a class called Movie with the following instance variables and methods. The instance variables are: namea string . director a string year an integer . length an integer (in minutes) The methods are: A constructor taking four parameters, one for each of the instance variables. Initialize the instance variables appropriately. Accessors (getters) for each of the instance variables. An accessor takes no parameters and returns the value of the appropriate field Mutators (setters) for cach of the instance variables. A mutator takes a single parameter and sets the appropriate field to the value of that parameter A toString method taking no parameters and returning a string consisting of the four in- stance variable valucs appropriately formatted. Writc a main mcthod to crcate several movies. Test cach of your methods. Your submission should include your tests. Points will be deducted for incomplete tests
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
