You will write a program that will read an integer qty and a double T. This information qty represents the number of items that will be purchased at price T. When computing the cost there will be additional values that need to be computed.
The initial cost is 𝒒𝒕𝒚 × 𝑻.
The sales tax which is computed as 4.4% of the initial cost.
The handling fee which is dependent on the quantity sold. The handling fee is illustrated by the following progression (see table below). This fee exists because shipper bundles quantities in groups of six with special packaging.
Additional items fee. We need to ship those items that cannot be grouped into a group of six using individual packing. The additional items fee is $2 times the number of items that cannot be packaged into group of 6. For example if qty=25 then there are 4 groups of 6 and the additional items fee is $2*1 because 1=25-6*4.
Quantity Handling Fee
Continue in this manner
Total cost = handling fee+ the initial cost, + sales tax + additional items fee
You need to compute and output the quantity, price, handling fee, the initial cost, the sales tax, the additional items fee and the total cost in a formatted manner. You are required to use good programming practices and well-comment your code. For fixed constants, you should use preprocessor definitions. Also you need to organize you work as follows by writing code in pieces that compute the initial cost, then computes the sales tax, then computes the handling fee, compute additional items fee, and lastly computes the total cost.
This assignment has been answered 4 times in private sessions.
© 2023 Codify Tutor. All rights reserved