Skip to content

AbdelkaderBoukhalfoun/cash_register_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cash Register App

This is a simple cash register application that allows users to calculate change based on the price of an item and the amount of cash provided by the customer. The application provides different messages based on whether the customer's cash is sufficient, exact, or insufficient to cover the price of the item.

Functionality

The application performs the following tasks:

  • Calculates the change due to the customer.
  • Checks if the cash provided is sufficient to cover the price.
  • Handles different scenarios like exact payment, insufficient funds, and closed cash drawer.
  • Outputs messages and the breakdown of change in different currency units.

Technologies Used

  • JavaScript
  • HTML
  • CSS (Required for styling the application)

Project Structure

The project consists of the following files:

  • index.html: Contains the structure and input elements of the application.
  • styles.css: Provides styling for the HTML elements (CSS is essential for enhancing visual presentation).
  • purchase.js: Manages the purchase logic and event handling.
  • change.js: Calculates the change due based on the price and cash provided.
  • format.js: Formats the output of the change due into a readable format.

Installation

To run the project locally:

  1. Clone the repository: git clone <repo_url>
  2. Open index.html in your preferred web browser.

Contributing

Contributions are welcome! If you find any issues or want to add new features, please feel free to fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors