Question: QUESTION 6 50 poi 5. Write a Java program to do the following. Create a class called Movietheatre. Create variables for the following fields given

QUESTION 6 50 poi 5. Write a Java program to do the following. Create a class called Movietheatre. Create variables for the following fields given below. Get the input from user using Scanner class for the fields given below. - Movietheatre name - use a String variable for this field City where the Movietheatre is located - use a String variable for this field - Number of screens that the movietheatre has - use an integer variable for this field Number of movies screened in this movietheatre - use an integer variable for this field - Ticket cost - use an integer variable for this field Whenever the user input is greater than 5 for the number of screens variable, an exception has to be thrown. Whenever an incorrect input is entered for the ticket cost, an InputMismatchException has to be thrown. Use try-catch blocks in your program to handle the exception in your program Print the output with a caught exception if it occurs in the program otherwise print the values of variables if exception does not occur in the program. Attach File Browse Local Files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
