/AirFare

Java console application to calculate airfare for flights by different airline agencies

Primary LanguageJava

AirFare Calculator

GitHub Link - https://github.com/pagaredivyanka/AirFare

Team

Divyanka Pagare

Overview

A Java console application to calculate airfare for flights by different airline agencies. This project demonstrates the object-oriented programming concept in Java, including encapsulation - getter and setter methods, selection statement - switch case used to make it interactive via a simple menu-driven interface.

Features

  • Airline Management
    • Define multiple airlines with specific base fares.
  • Flight Management
    • Define flights with specific airlines, origin, destination, and distance.
  • Fare Calculation
    • Calculate the airfare for a flight based on the distance and the airline's base fare.

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • A terminal or command prompt for running the application

How to Run the Project?

Clone the repository

Compile the project

  • javac -d bin src/*.java

Run the application

  • java -cp bin AirFare