CS 1301 Assignment - 5 Marks Write a complete and separate Java program to solve cach of the following problems. Upload
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
CS 1301 Assignment - 5 Marks Write a complete and separate Java program to solve cach of the following problems. Upload
statement. Problem 2: Saudi Airlines permit each passenger to hold one bag. The maximum weight allowed for the bag depends on the class of the passenger which is: 30kg for First class ('F'), 25kg for Business ('B') and 20kg for Economy ('E'). If the weight of the bag excesses the allowed one, the passenger should pay 10 SR for each Kg. Write a program that calculates the excess baggage charge. All input data should be read by the user. Solve the problem using the switch statement. The program should repeat as long as the user needs. Problem 3: Saudi Airlines permit each passenger to hold one bag. The maximum weight allowed for the bag depends on the class of the passenger which is: 30kg for First class ('F'), 25kg for Business ('B') and 20kg for Economy ('E'). If the weight of the bag excesses the allowed one, the passenger should pay 10 SR for each Kg. A flight is allowed to carry 1000 kg baggage maximum. No passenger after that is allowed to take the flight. Write a program that calculates the excess baggage charge. All input data should be read by the user. Solve the problem using the switch statement. The program should repeat as long as the user needs. Display the number of processed passengers.
CS 1301 Assignment - 5 Marks Write a complete and separate Java program to solve cach of the following problems. Upload the lava file for each program. Problem 1: Saudi Airlines permit each passenger to hold one bag. The maximum weight allowed for the bag depends on the class of the passenger which is: 30kg for First class ('F'), 25kg for Business ('B') and 20kg for Economy ('E'). If the weight of the bag excesses the allowed one, the passenger should pay 10 SR for each Kg. Write a program that calculates the excess baggage charge for the passenger. All input data should be read by the user. Solve the problem using the switch