Question: Write a program to produce a sales receipt. Each time the user clicks on a button, an item and its price should be read from

Write a program to produce a sales receipt. Each time the user clicks on a button, an item and its price should be read from a pair of text boxes and displayed in a properly aligned list box. Use a class-level variable to track the sum of the prices.

When the user clicks on a second button (after all entries have been made), the program should display the number of items purchased, sum of the prices, the sales tax (assuming an HST of 13% of the total), and the total amount to be paid.

The "Close Transaction" button should clear out the listbox and all of your variables should be reset to their default values. This is to allow a new transaction to take place.

The figure bellow shows a sample output of the program. Your output should be formatted to look something similar to what is shown here. Note: These are dollar values and therefore should be restricted to the appropriate number of decimal places etc.

Write a program to produce a sales receipt. Each time the user

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!