1. Suppose you are working in an airline company. Customers check baggage with various sizes and weights. Each piece of baggage has its own dimensions (length, width, height) as well as weight. You will write a Java program that allows the airline staff to input baggage dimensions and weight information. The computer will determine if the baggage is allowed to be checked in. If it is allowed, the system will then calculate the price based on the size and weight. If not allowed, the system will notify the staff by telling that piece of baggage is not allowed due to the weight limit and/or size limit.
The baggage policy of this airline company is as follows:
(1) Any dimension (length, width, height) should not exceed 32 inches. Total dimensions (length+width+height) should not be over 60 inches.
(2) Weight limit for each piece of baggage is 50 pounds. Any baggage more than 50 pounds will not be accepted.
(3) The price for each piece of baggage is determined by its weight at the rate of $1.50 per pound. However, there is a minimum charge of $5.00 regardless of weight (this is not a base charge).
Example:
(1) Customer A brings her luggage case weighted at 75 pounds. This piece will be rejected due to the weight limit.
(2) Customer B brings a small box (2 inches by 2 inches by 3 inches) weighted at 3 pounds. The charge is $5.00 not $4.50.
(3) Customer C brings a large box (20 inches by 30 inches by 15 inches) weighted at 45 pounds. This piece will be rejected due to the size limit.
(4) Customer D brings his luggage case (10 inches by 30 inches by 5 inches) weighted at 20 pounds. This luggage case is accepted and the charge is $30.00.
Instructions on coding:
(1) You will need to write separate classes. One is the main class (the driver) and the other one is the Baggage class that handles weights, sizes, prices, etc.
(2) Inputs of weight and three dimensions are from the keyboard.
(3) Your program should accept one entry with inputs of three dimensions and weight information. You do not have to write a loop to accept multiple entries at this time. But if you write the loop, it will be accepted and welcomed.