Question: Java: As simple as possible * This program is on creating classes Create a movie class that contains the tollowing information *The name of the
Java: As simple as possible

* This program is on creating classes Create a movie class that contains the tollowing information *The name of the movie, the movie rating, such as G for general audience, PG for parental guidance, PG-13, etc, he year the movie was made, and the run time in minutes. You'1l need instance data for each piece of information *The name of the movie, the rating, the year and the run time, as ?ell as a public interface *Remember, when creating classes, yo will need a const uctor *In your main program, you aek the user to enter the information about their favorite movie, ircluding the title, the rating, the year and the run time, then create a movie ol *Finally, print it out using a two String method twrite comments in the source code Upload the Source Code, screen shot of the running program import java.util.Scanner; *author public class KovieList. *param args the coamand line arguments public static void main(String args) t Scanner in - new Scanner (System.in) String movie, rating: int year, runtime; Movie favoriteMovier System.out.printin("Please enter novie title: ") movie ?n.nextLine(); System.out.printin "Please enter novie rating:" rating-in.nextLine() System.out.printin("Please enter year produced: year - in.nextInt(); System.aut.println"Please enter total runtime ; runtimein.nextInt) favoriteMovie-new Movie movie, rating, year , runtime); system" out. pr intIn( favoriteMovie. toString( ))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
