Question: 1 1 . 1 . 5 : Handling input exceptions: restaurant max occupancy tracker. Arrange the following lines to make a program that determines when
: Handling input exceptions: restaurant max occupancy tracker.
Arrange the following lines to make a program that determines when the number of people in a restaurant equals or exceeds
occupants. The program continually gets the number of people entering or leaving the restaurant. Ex: means two people
entered, and means three people left. After each input, the program outputs the number of people in the restaurant. Once the
number of people in the restaurant equals or exceeds the program exits.
If an InputMismatchException exception occurs, the program should get and discard a single string from input. Ex: The input
abc should result in occupants. Not all lines are used in the solution.
How to use this tool
MaxOccupancyTracker.java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
