This is a console scala app that uses data from 3 csv files airports.csv, runways.csv and airlines.csv that are located in the src/main/data folder to enable a user to search for an airport and its associated runways and airlines information and to display some other basic informations.
The approach used here is a functional programming approach. Click here to know more about functional programming.
So the app has two parts : query and report.
- Query :
- User enters a country name or code and the app displays the airport & runways at each airport. (See screesnshots below)
- User can also enter a partial country name because the query supports matching partial/fuzzy names. e.g. entering zimb will result in Zimbabwe
- Report:
- The app displays the top 10 countries with the highest number of airport. (See screenshots below)
- The app displays the bottom 10 countries with the lowest number of airport.
- The app displays type of runways per country
- The app displays the top 10 most runway latitude
- Clone the app using the following command:
git clone https://github.com/ekane3/Airport-scala-app.git
- Go to the app folder and run the following command:
sbt run
(orsbt clean compile run
if you want to clean the project before running it)
The app will run in the terminal. - To run tests, go to the app folder and run the following command:
sbt test
-
Running the app:
If user enters query we have the following 👇 :
- Running the tests: