Create a simple seat booking program for a 10 seater passenger aircraft. The seats are numbered 1 - 10 of which 1 - 5 are in a smoking section of the plane and 6 - 10 are in the non smoking section.
The user should be prompted
Please type 1 for SMOKING
Please type 2 for NON-SMOKING
On entering 1 or 2, a seat should be allocated to the passenger and a boarding pass printed on the screen. The boarding pass must include the seat number and whether the passenger is in the smoking or non-smoking area.
No seat should be booked more than once.
If a request is made for a seat in the smoking area and there are no available seats then the user should be prompted "Are you willing to sit in the NON-SMOKING section (Y/N?)"
If the answer is Y then a non-smoking seat will be allocated and a boarding pass printed. If the answer is N then the user is told "OK, next flight is in 3 hours"
If a seat in the non-smoking area is requested and there are no available seats then similar action should be taken to what is above.