Access to the entire functionality must be implemented using WebAPI and each method will return JSON objects. To test the application, you can use the following tools: Postman or Fiddler
-
ASP.NET Core with open REST API
-
Class Library which will contain all logic for work with parking
-
Number of vacancies (GET)
-
List of all machines (GET)
-
Details on one machine (GET)
-
Delete machine (DELETE)
-
Add a car (POST)
-
Number of occupied places (GET)
-
General Balance (GET)
-
Fill the machine balance (PUT)
-
OutputTransactions.log (GET)
-
Output last minute transaction (GET)
-
Output a transaction for the last minute on one particular machine (GET)
There should be only 1 parking in the program. When you initialize the parking, you must use the Settings class. Parking keeps a list of machines / transactions.
You can add a car to the parking lot or pick up from the parking lot. Every N-second parking charges money from the car. If the car does not have enough money to pay parking, then write off the penalty (the penalty coefficient * the parking price). Also, we can not pick up the car until we replenish the balance and repeat the operation.
When debiting funds, parking keeps transactions for the last minute. At any time, we can turn to the parking lot and find out the current balance (earned money). We can apply to the parking lot and find out the amount of money earned in the last minute. We can apply to the parking lot and find out the number of free / occupied places in the parking lot. The cost of parking depends on the type of car.
-
Property Timeout (every N-second writes off the funds for the parking space) - the default is 3 seconds
Dictionary - a dictionary for storing parking prices (for example: for trucks - 5, for cars - 3, for buses - 2, for motorcycles - 1)
Property ParkingSpace - parking capacity (total number of seats)
Property Fine is the penalty factor
-
List of machines
Transaction List
Property Balance (Earned Money)
-
Property identifier
Property balance
Property type of machine
-
Passenger
Truck
Bus
Motorcycle
-
Property Date / Time of the Transaction
Property Machine ID
Property Write-off
“The Way Get Started Is To Quit Talking And Begin Doing.” – Walt Disney