Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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.

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions