A simple Java mini-project for practicing user input, arithmetic operations, and console formatting.
- Input item name, price, and quantity
- Calculate total cost
- Confirm order before checkout
- Colorful thank-you message with ASCII art
- Runs in IntelliJ or terminal
- Clone or download the repo
- Open in IntelliJ IDEA
- Run
Main.java
- Follow prompts to enter items and quantities
- See your total and thank-you message
Item: apple
Price: 0.50
Quantity: 4
Output:
Perfect! You want to buy 4 apple(s) for £0.5 each. Is that correct? (yes/no): yes
## Your total will be: £2.00
## Thank you so much for your purchase!
Made by CodingNORVIN
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@%..*@@@@@@+.#@@@@#=:....:=%@@@@#..:::::-*@@+.=@@@@@@@@=.#@@-.%@@@:.+@@@@@@#.=@@@@@@@@@@@@
@@@@@@@@@@% =@@@@@+ *@@@- :*%%%%+. =@@@* -@@%%#- -@@. *@@@@@@* :@@@. #@@@ -@@@@@# -@@@@@@@@@@@@
@@@@@@@@@@% -= -@@@@+ *@@: +@@@+#@@@- -@@* -@@@@@@ %@# .@@@@@@. %@@@. #@@@ :+ :%@@@# =@@@@@@@@@@@@
@@@@@@@@@@% -@+ .%@@+ *@* :@@%* :#@@@. %@* -@@@@%- -@@@= -@@@@- *@@@@. #@@@ :@* .#@@# =@@@@@@@@@@@@
@@@@@@@@@@% -@@# *@+ *@+ -@*= .=#@: #@* ::...-*@@@@@: *@@* -@@@@@. #@@@ :@@#. *@# =@@@@@@@@@@@@
@@@@@@@@@@% -@@@%. *+ *@# .@@@%.=@@@% %@* -%%* .%@@@@@@% .@@..%@@@@@. #@@@ :@@@%: =# =@@@@@@@@@@@@
@@@@@@@@@@% -@@@@@- . *@@= :%@@#@@@#. *@@* -@@@# #@@@@@@+ -- *@@@@@@. #@@@ :@@@@@= . =@@@@@@@@@@@@
@@@@@@@@@@% -@@@@@@= *@@@*. -+**+: :#@@@* -@@@@#. *@@@@@@: -@@@@@@@. #@@@ .@@@@@@+ -@@@@@@@@@@@@
@@@@@@@@@@%=*@@@@@@@*=#@@@@@#=----+#@@@@@%=*@@@@@%==@@@@@@%==@@@@@@@@+=%@@@=+@@@@@@@#=*@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Item: banana
Price: 0.30
Quantity: 5
Output (if user says "no"):
Perfect! You want to buy 5 banana(s) for £0.3 each. Is that correct? (yes/no): no
Okay, let's try again!
- Currency: £ (GBP)
- Confirmation: Accepts
yes
/y
(case-insensitive) - Colors: ANSI escape codes for styled console output
- ASCII Art: Included in thank-you message
MIT © CodingNORVIN