Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diecatiamonteiro/the-cashier-program
The Cashier program simulates a cashier system. This project was created as an assignment after I completed the first JavaScript module.
https://github.com/diecatiamonteiro/the-cashier-program
javascript npm-module npm-package
Last synced: 3 days ago
JSON representation
The Cashier program simulates a cashier system. This project was created as an assignment after I completed the first JavaScript module.
- Host: GitHub
- URL: https://github.com/diecatiamonteiro/the-cashier-program
- Owner: diecatiamonteiro
- Created: 2024-09-09T13:44:30.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T18:16:58.000Z (2 months ago)
- Last Synced: 2024-10-13T08:04:27.441Z (about 1 month ago)
- Topics: javascript, npm-module, npm-package
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Cashier Program
![cashier](/img/cash_register.png)
## Overview
The Cashier program simulates a cashier system with a cash counter function that manages the calculation of change after a transaction. The system ensures that the correct amount of change is given back using the available bills and coins while keeping track of the cash box.
Its main features are:
- **Change Calculation**: The program calculates the total change needed and determines the exact number of bills and coins needed for change.
- **Cash Box Management**: The cash box is updated after each transaction.
- **User-Friendly Messages**: Handles insufficient payment or situations where no change is available with helpful messages.
- **Stylized Output**: Displays a formatted breakdown of the change to the user using **Chalk** for colorful output in the console.## Cashier setup
1. Clone the repository:
```bash
git clone [email protected]:diecatiamonteiro/the-cashier-program.git
```2. Install dependencies:
```bash
npm install chalk
```3. Run the program:
```bash
node index.js
```## Cashier example usage
![cashier example](/img/cashier-example.png)