Question: You are asked to create a receipt generation module for your companys Point of Sale software. The receipt will consist of heading lines, then one

You are asked to create a receipt generation module for your companys Point of Sale software.

The receipt will consist of heading lines, then one line per product sold, and then several summary lines giving the total price, GST, and change calculation. The lines will be 40 characters long.

For each item sold, you will ask the user three questions: The name of the item, the quantity sold, and the unit price. If the name of the item is empty (the user just presses Enter) it means there are no more items and you will instead ask the user for the amount of cash paid, and then finish the receipt.

To simplify the scenario (because weeks 15 of the course do not cover storage of data in the computers memory) we will ask for the information progressively, and print the information as it is received. Note that the total and GST lines will be printed before asking for the amount of cash paid.

The formatting of the receipt must be as follows:

The first heading line has to say WELCOME TO MY STORE on the left, then spaces, then TAX INVOICE on the right. The second heading line has to say ABN 00 000 000 000.

There must be a blank line between the heading lines and the items.

The item lines must have 25 columns for the item name, 5 columns for the quantity sold (an integer) and 10 columns for the line price (the quantity times the unit price; with two decimal places). The item name must be printed in uppercase.

There must be a blank line between the items and the summary lines.

The summary lines must be, in order: (i) TOTAL in 30 columns followed by the total in 10 columns (with two decimal places), and similarly for (ii) GST INCLUDED IN TOTAL, (iii) CASH PAID and (iv) CHANGE. The GST included in the total is calculated by dividing the total by 11.

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!