Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

Students also viewed these Databases questions