Answered You can hire a professional tutor to get the answer.

QUESTION

The UML diagram below describes a class named Movie. Implement this class in Java and test it from a main method that creates several Movie objects.

The UML diagram below describes a class named Movie. Implement this class in Java and test it from a main method that creates several Movie objects. The printDescription() method should output all member variables for the class. Movie - title: String- minutes: int- year: int#price: double +Movie (String title, int minutes, int year, double price)+getTitle() : String+setTitle(String newTitle) : void+printDescription() : void The word "in" means the parameter is used to deliver data to the method.Can you help me with this. I cannot figure this one out myself. I need some help with the code that I need to enter./** * Class that contains information about a movie. */import java.text.DecimalFormat;public class Movie {// --------------------------------// ----- ENTER YOUR CODE HERE -----// --------------------------------// --------------------------------// --------- END USER CODE --------// --------------------------------public static void main(String[] args) {// Test the constructor and printDescription with an integer priceMovie ap = new Movie("Austin Powers: International Man of Mystery", 90, 1997, 9);System.out.println("Movie with $9.00 price:");ap.printDescription();System.out.println();// Test resetting the titleMovie md = new Movie("Mulholland Dr.", 145, 2001, 18.99);System.out.println("Movie with abbreviated title:");md.printDescription();System.out.println();md.setTitle("Mulholland Drive");System.out.println("After setting title:");md.printDescription();System.out.println();// Make another movie to test getTitle and formatting of pricesMovie os = new Movie("Office Space", 89, 1999, 12.989);System.out.println("Information for "" + os.getTitle() + "":");os.printDescription();}}

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question