Skip to content

Completed Task 1 of name Online Reservation System in Java Programming language using Eclipse IDE.

Notifications You must be signed in to change notification settings

sakshi-0009/OIBSIP-Project1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

OIBSIP-Project1 : Online Reservation System

Oasis Infobyte Internship - Task 1 :-

Completed Task 1 of name Online Reservation System in Java Programming language using Eclipse IDE.

Steps Required :

  1. First, the code creates an array of boolean values called seats with a length of 10. Each element in the array represents a seat, and the value true indicates that the seat is reserved, while false indicates that the seat is available.

  2. The main method sets up a loop that displays a menu of options to the user and gets their input. The user can choose to view the current seat map, reserve a seat, cancel a reservation, or exit the program.

  3. The viewSeatMap method simply prints the current state of the seats array to the console, with an "X" indicating a reserved seat and the seat number indicating an available seat.

  4. The reserveSeat method prompts the user to enter a seat number, checks if the input is valid, and if the seat is available, sets the corresponding element in the seats array to true to reserve the seat.

  5. The cancelReservation method works similarly to the reserveSeat method, but instead sets the corresponding element in the seats array to false to cancel the reservation

About

Completed Task 1 of name Online Reservation System in Java Programming language using Eclipse IDE.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages