Building the SkyReserve Flight Booking System Using Java Operators

Business Scenario

Welcome back,Developers!

After successfully storing flight information in the SkyReserve system, the airline is now ready to accept bookings from passengers.

Imagine a passenger wants to book tickets from Mumbai to Delhi.

So , your mission is to build the airline's first Ticket Booking Module

This module will automatically calculate fares, apply discounts, process additional charges, and make booking decisions—just like a real airline reservation system.

The system must calculate the total fare, apply discounts, add service charges, check special offers, and determine meal preferences.

Performing all these calculations manually would be slow and error-prone.

Pre-Lab Preparation

git pull origin branchName

Git Pull

Topic :

1) Understanding of variables and data types

2) Basic knowledge of operators in Java

Task 1: Flight Booking Program in Java

Open Eclipse and Create a new Java file named FlightBooking.java. and define main method

1

Create a Scanner object to read input from the user.

2

Accept user inputs

3

Accept user inputs

4

Display the final booking details using System.out.println().

5

Compile and run the program.

6

 

Great job!
You have successfully built the Flight Booking Module and automated fare calculations using Java.

Checkpoint

Next-Lab Preparation

Topic :

1) Static concepts: defining static variables, and static methods

2) Accepting user inputs and displaying them using System.out.println

3) Arithmetic and assignment operators 

   Git Push

git push origin branchName

Java - lab 3

By Content ITV

Java - lab 3

  • 12