A JavaScript application that calculates the amount of change to be given for a transaction and breaks it down into bills and coins of various denominations.
- Change Calculation:
- Automatically calculates the change due based on the bill amount and the cash received.
- Supports denominations including $20, $10, $5, $1 bills, and quarters, dimes, nickels, and pennies.
- Input Validation:
- Ensures the cash amount is sufficient to cover the bill.
- Displays an error message if the input is invalid or insufficient.
- Dynamic Updates:
- Automatically updates the number of each bill and coin needed for the change.
- Error Handling:
- Uses a try-catch block to handle errors gracefully and provide user feedback.
- HTML: Provides the structure for the cash register interface.
- CSS: Used for styling the application for a better user experience.
- JavaScript: Implements the core functionality, including event handling, calculations, and DOM manipulation.
- Open the changeCalculator_txt.html file in a web browser.
- Enter the cash amount and bill amount in the respective input fields.
- View the calculated change and the breakdown of denominations.
This program was developed as part of an assignment for my programming class. The folder names and structure reflect the required naming convention for class submissions.