C++: Derived Data Types - Sales (Challenge)
Design and code a program that totals a set of sales records, each of which consists of a quantity, a unit price and a taxable status. Your program prompts for and accepts a quantity, a unit price and a taxable status and continues to accept such triples until the user enters 0 for quantity. Your program can store up to 100 triples. It displays the pre-tax total, the gst, the pst and the sales total for all of the information entered.
The output from your program looks something like
Quantity : 2
Unit Price: 1.99
Quantity : 1
Unit Price: 2.99
Quantity : 5
Unit Price: 1.00
GST (7%) 0.28
PST (8%) 0.32
Your program includes a function named total that receives the sale information in an array of instances of Sales types and returns the total information in an instance of a Total type. A Sales type holds the quantity, the unit price and the taxable status for a single item. A Total type holds the total price, the total gst and the total pst. Place your function prototype and your declarations of the two derived types in a file named Sales.h
Please help me.
Re: C++: Derived Data Types - Sales (Challenge)
What's the prize, as this is marked Challenge?
Or is this your homework, in which case where are you stuck?
|All times are GMT +5.5. The time now is 02:47.|