An open API service indexing awesome lists of open source software.

https://github.com/memosainz/airlineexercise-java

A complex exercise in Java to show the skills after reading the instructions. There's a need to use the terminal to know how this works.
https://github.com/memosainz/airlineexercise-java

java oop

Last synced: 9 months ago
JSON representation

A complex exercise in Java to show the skills after reading the instructions. There's a need to use the terminal to know how this works.

Awesome Lists containing this project

README

          

## Airline Exercise

> [!IMPORTANT]
>
> An airline has 6 destinations to which it operates 3 flights daily, one in the morning, one at noon and one at night. To manage this data, it uses a matrix, where each row is a destination and each column stores the number of available seats.

| | | Mornin' | Afternoon | Evening |
| :---: | :---: | :---: | :---: | :---: |
| 0 | Rio de Janeiro | 100 | 30 | 5 |
| 1 | Cancun | 50 | 5 | 5 |
| 2 | Madrid | 25 | 5 | 5 |
| 3 | Roma | 10 | 5 | 70 |
| 4 | Milan | 90 | 5 | 20 |
| 5 | Londres | 90 | 5 | 5 |

> [!IMPORTANT]
> i. A program is needed that allows the loading of the matrix with the number of seats for each flight.
>
> ii. At the same time, the program must allow a user to enter the destination number to which he wants to go, the flight number (depending on whether he wants to travel in the morning, at noon or at night) and the number of tickets he needs.
>
> iii. Based on the user's request, the program must check if there are enough seats for the number of tickets required. If there are, a screen must be displayed saying "your reservation was made successfully" and the seats requested by the user must be deducted from the total number of seats. If there are no more seats available, another screen must be displayed saying "sorry, your operation could not be completed because there are no seats available."
>
> The airline company states that it DOES NOT KNOW how many sales/reservations are made per day. Therefore, to finalize sales, the word "finish" is entered.


All lefts reserved © Memo Sainz 2024