Skip to content

Latest commit

 

History

History

shopping-cli

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Go-shopping

A simple shopping cart cli application

Features

  • Add items to cart
  • Select items to buy
  • Checkout the items
  • Pay for the items
  • Get discount
  • Print receipt

Implementation

1. Add items to cart

Ask for name and price, store in a map. Later write the info in a .json file for persistence.

2. Select items to buy

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

3. Checkout the items

Allow user to leave buy mode and go to payment

4. Pay for the items

Display total and allow for payments to be made, prepare receipt for the sale.

5. Get discount

😄 If all goes well give a discount to the customer and end the thing. 🛒