A simple shopping cart cli application
- Add items to cart
- Select items to buy
- Checkout the items
- Pay for the items
- Get discount
- Print receipt
Ask for name and price, store in a map. Later write the info in a .json file for persistence.
List all the items from the map, let user select the code and add it to shopping cart. Cart will be a struct. Perform the following operations: add items, discount and total, tax e.t.c
Allow user to leave buy mode and go to payment
Display total and allow for payments to be made, prepare receipt for the sale.
😄 If all goes well give a discount to the customer and end the thing. 🛒