Skip to content

Anan-Elayan/Flight-Reservation-System-I-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flight Reservation System I

Objectives

  • Displaying output on the console.
  • Obtaining input from the console using the Scanner class.
  • Using variables to store data.
  • Implementing selection control using if statements.
  • Implementing selection control using switch statements.
  • Writing programs for executing statements repeatedly using loops.

Task Overview

Develop a Java program for managing seat reservations on a small flight. The flight contains 10 seats numbered (11, 12, 21, 22, .., 51, and 52).

Menu Options 1- Reserve a new empty seat. 2- Delete a reserved seat. 3- Delete all reserved seats. 4- Print out the number of reserved seats. 5- Quit.

Option Details

Reserve a New Empty Seat

  • Prompt the user to enter a valid seat number.
  • Check if the entered seat number is valid.
  • If valid, check if the seat is empty.
    • If not empty, prompt the user to re-enter a new seat number.
    • If empty, mark it as reserved.

Delete a Reserved Seat

  • Prompt the user to enter a valid seat number.
  • Check if the entered seat number is valid.
  • If valid, check if the seat is reserved.
    • If empty, prompt the user to re-enter a new seat number.
    • If not empty, mark it as not reserved.

Delete All Reserved Seats

  • Mark all seats as not reserved.

Print out Number of Reserved Seats

  • Display the number of reserved seats. Quit
  • Exit the program execution.

About

Flight Reservation System-1 | Java 1 Phase 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages