๐ฌ Candy Machine (Java)
A Candy Machine program built using Java in jGRASP.
This program simulates a vending machine where users can:
- Select a candy item
- Insert money
- Calculate the remaining balance
- Receive change if needed
- Scanner Console
- If - else if - else statement
- Basic arithmetic calculations like:
double change = (money - cost);The user chooses between 5 sections of candy.
Then the user inserts the money that they have.
If the user has the perfect amount, nothing is returned,
If they insert more, the user takes the change,
and if the user inserts less money,
The program will say:
System.out.println("You're broke. Take your " + money + " and go elsewhere"); /!\ This is a Java program I wrote for a class assignment. /!\
xoxo.