My code asks for a user to pay for their parking. I would like the user have to ability to add money to the program. So right now the code runs through the loop it just states how much money it would cost. I would like the user to have the ability to add money so that the program ends when the totalAmountCollected - amount of the the user ended so that the program will exit when the balance is 0.
Please remind yourself how code tags work; I have added them for you this time, otherwise that code would have been illegible.
Why are you using Option Pane for keyboard input? That is very old‑fashioned style.
Why are all your methods marked static?
Why are you multiplying by 1.5 and then casting to an int in line 148?
How do you think you should record the amount paid in the parking machine? Do you simply want a running total of what has been paid?
posted 2 years ago
Well I originally thought there would be a question to ask the user at the beginner do you want to add money or buy services. Adding money and buying services would be their own separate loops. But that is first thing I am confused about can this program be done with only loop or two. Thanks.