Task 1
Write a console program that simulates a vending/change machine. After starting the program, a random value between 1.00 € and 10.00 € for the cost of an imaginary product should be charged and a message is given to the user with asking for payment. The user enters the amount of money he/she puts into the vending machine. The user's input has to be validated. Allowed inputs are numbers in the following format: "000.00". If the input is not valid, or the amount entered is not enough to cover the price, a message will be displayed and the input must be repeated. Then calculate how much change is to give back. The given change has to be displayed to the user as a message. The program runs infinitely. By entering 'q' the user can end the program. This should also be confirmed by a message.
Save the stand of your solution as a "Task 1" using any appropriate tool (like your GitHub).
Task 2
Extend your program from Task 1 with the following functions: The machine should calculate the change so that as few coins as possible are given out. Show the result to the user as output. The following EUR coins are available: 2.00 1.00 0.50 0.20 0.10 0.05 0.02 and 0.01.
Save the stand of your solution as a "Task 2" using any appropriate tool.
Task 3
Extend your program from Task 2 with the following functions: Instead of random price for a product, use a list of 10 items with their own prices. In the beginning of the program, the list of products is presented as a menu from which the user can choose one. Choose the product names and prices yourself.
Save the stand of your solution as a "Task 3" using any appropriate tool.
Task 4
Extend your program from Task 3 with the following functions: The cash box of the machine can contain a maximum of 50 coins of each type. At the beginning, there are 20 coins of each kind. The user should be able to enter with which coins he wants to pay. The machine should take into account the user's coins and coins of change. If a cash box is full or has not enough money to give out the change, the machine cancels the operation giving back all the money previously entered and the program returns to the product selection.
Save the stand of your solution as a "Task 4" using any appropriate tool.
Task 5
Extend your program from Task 4 with the following functions: Include a service menu in the product selection that allows a service representative to check and change the fill level of each cash box. He should be able to add and remove coins.
Save the stand of your solution as a "Task 5" using any appropriate tool.
Task 6
Extend your program from Task 5 with the following functions: Save the fill level of the individual cash boxes in a suitable format as a file and load it again when the program starts.
Save the stand of your solution as a "Task 6" using any appropriate tool.