Question: Hi All, I need some help with some PHP coding work, assist would be greatly appreciated. Create a web application that calculates the correct amount

Hi All,

I need some help with some PHP coding work, assist would be greatly appreciated.

Create a web application that calculates the correct amount of change to return when performing a cash transaction. Allow the user (a cashier) to enter the cost of a transaction and the exact amount of money that the customer hands over to pay for the transaction.

Then determine the largest amount of each denomination to return to the customer. Assume that the largest denomination a customer will use is a $100 bill. Therefore, you need to calculate the correct amount of change to return, the number of $50, $20, $10, $5, and $1 bills to return, and the number of quarters, dimes, nickels, and pennies to return. For example, if the price of a transaction is $5.65 and the customer hands the cashier $10, the cashier should return $4.35 to the customer as four $1 bills, a quarter, and a dime.

Use a Smarty template design that effectively separates the business logic required to perform calculations from web presentations used to accept user inputs and display results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!