JAVA PROGRAM: You have been hired to create an application for the…

Question Answered step-by-step JAVA PROGRAM: You have been hired to create an application for the… JAVA PROGRAM:You have been hired to create an application for the local movie theater. They need to be able to set up movie titles and prices, sell tickets, and create reports needed by the management. You can decide how many movies are showing in the theater, but the minimum is 5. You can set the prices for the tickets, but the following categories must be included:Matinee – Adult , Matinee – Child Regular – Adult, Regular – ChildPart 1 – main Method and the MenuYour main method should set up any variables that will be needed throughout the program. For the number of movies showing and the prices, you can declare them as final in your main method, with the variable names in all CAPS to make your program readable.Example: final int NUM_MOVIES = 5;final double ADULT_REGULAR = 12.50;final double CHILD_REGULAR = 9.50;final double ADULT_MATINEE = 9.50;final double CHILD_MATINEE = 6.50;Other variables that will be needed include: 1) An array to hold the movie titles 2) A running total sales revenue 3) A running total of the number of tickets sold overallThe main method will present a menu to the user, providing the following 4 options: 1. Set Movie Listings 2. Sell Tickets 3. Generate Reports 0. ExitDetails for each menu item are outlined in the following steps.Using a loop, the main menu displays until the user selects option 0 to exit. The code for the menu options should appear 1 time only! For example, if the user selects option 1 from the main (“Set Movie Listings”), the user is prompted to enter the individual titles. After the titles are entered, the user is presented with the main menu again.Part 2 – Set Movie ListingsWrite a method – setListings() – that is called when Option 1: Set Movie Listings is selected from the menu. It should accept 1 argument, an array that holds the movie titles. This method does not need to return any information. In a loop, prompt the user to enter each movie title individually and store each one in an array subscript. Since arrays are passed by reference (address) any changes to the arrays will be visible by the calling method.Part 3 – Sell Tickets.When Option 2: Sell Tickets is selected from the menu, prompt the user to select the type of movie (Matinee or Regular) and the number of Adult and Child tickets requested. Update a running total of the number of Adult tickets and Child tickets sold. Write and call a method – calcTicketSale() that accepts the number of adult tickets, the price of an adult ticket, the number of child tickets, and the price of a child ticket. It should return the total amount of the sale. Update a running total of the ticket sales with the return value from the calcTicketSale() method.Part 4 – Generate ReportsWhen Option 3: Generate Reports is selected from the menu, call a method – printReport() that accepts the array of movie titles, the total sales amount, and the total number of tickets sold. No return information is needed.Remember!o You must create running totals in the main method and initialize the values to 0o When you pass the name of an array to another method, that method has full access to all the individual values, as well as the length of the arrayo All working variables should be created in the main method and passed to the other methods.o Include prompts when asking for inputo Label your outputo Test thoroughly! Computer Science Engineering & Technology Object-Oriented Programming Share QuestionEmailCopy link Comments (0)