This project was created from a tutorial by DMdev.
The main condition of the task to create the project "Cafe" is to use only Java Core.
Task condition.
There are many users who can place
every 30 seconds to order from the following list:
Steak (500 calories, $10)
Salad (50 calories, $5)
Potatoes (300 calories, $3)
Coca-Cola (25 calories, $2)
Ice cream (150 calories, $4)
The user can choose in their order, for example, one steak
or two potatoes and salad,
or just a Coca-Cola (implement random order formation).
There are many cash registers that take orders from users.
It takes 1 second to prepare each item in the order.
For example, it takes the cashier 3 seconds for 2 potatoes and salad.
There are also three tasks.
The first runs once a minute and records statistics
for cash registers in csv file in the format:
cashier id, number of orders, total.
The second task runs once every two minutes and writes statistics
users in the file in the format:
user id, number of orders, average number of calories.
The average cost of the order.
The third task is started every 60 minutes and defines the best cashier
(according to the average ticket) and the most gluttonous user
(by the total amount of calories) from the two previous files
(implement csv file reading)
The result is simply displayed on the console.
The task is executed endlessly.
You can't use 3rd party libraries, only Java Core.