Find Jobs
Hire Freelancers

C++ Book Sales Calculator

$30-250 USD

Cancelled
Posted almost 13 years ago

$30-250 USD

Paid on delivery
Assignment: Write a program (Book Sale Calculator) that accepts all input from an external data file and displays a summary for each book sale. The program needs to open the external data file ([login to view URL]) and continue to read in data until the end of the file is reached. No sentinel value can be used to signal termination, and you cannot count the number of items in the file or use a count controlled loop to obtain the data. The data file is stored so that the number of books in each sale and the single character code for shipping (S = Standard which is 4.99 and E for Expedited is 12.99) representing the shipping method is on one line, and the prices for all of the books are on the second line. Create four functions for the following: (1) Obtain the name of the data file and attempt to open it for reading. If the attempt to open the file fails, the program should report an appropriate error message and quit. (2) Obtain all input for each sale from the data file. This function should return the merchandise subtotal and shipping method for the current sale being processed. (3) Calculate all taxes and discounts. (4) Display a final summary for each sale. The sales tax is .05% Discounts are as follows: * If the subtotal is < $50, there is no discount * If the subtotal is between $50-$100, the discount is 10% * If the subtotal is above $100, the discount is 15% Additionally, no global variables can be used and all information must be shared between functions via parameters and return values. The main function should consist of variable declarations, function calls, and a control loop for reading each sale from the file can be there. The external data file name ([login to view URL]) consists of the following format: 5 S 2.99 12.45 13.23 21.99 24.59 1 E 34.95 3 E 8.99 12.45 7.58 7 S 5.66 12.35 23.56 40 12.99 16.32 11.23 ****A sample output of the program:**** The summary for order #1 is as follows: Subtotal: 75.25 Tax: 3.76 Discount: 7.53 Shipping: 4.99 Total: 76.48 The summary for order #2 is as follows: Subtotal: 34.95 Tax: 1.75 Discount: 0.00 Shipping: 12.99 Total:49.69 The summary for order #3 is as follows: Subtotal: 29.02 Tax: 1.45 Discount: 0.00 Shipping: 12.99 Total: 43.46 The summary for order #4 is as follows: Subtotal: 122.11 Tax: 6.11 Discount: 18.32 Shipping: 4.99 Total: 114.89 Thanks for shopping with us. Come again!
Project ID: 1034202

About the project

22 proposals
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
22 freelancers are bidding on average $36 USD for this job
User Avatar
Hi kindly check your inbox for my inquiries. Thanks.
$30 USD in 0 day
5.0 (626 reviews)
7.2
7.2
User Avatar
Details in PMB
$30 USD in 1 day
4.7 (128 reviews)
6.6
6.6
User Avatar
Can be done!
$30 USD in 0 day
5.0 (14 reviews)
5.7
5.7
User Avatar
Please check PMB.
$30 USD in 0 day
4.6 (35 reviews)
5.3
5.3
User Avatar
Please see pmb, thanks.
$30 USD in 0 day
5.0 (28 reviews)
4.2
4.2
User Avatar
Please see your PM
$30 USD in 2 days
4.7 (13 reviews)
4.1
4.1
User Avatar
Senior developer with more than 3 years experience.
$30 USD in 3 days
5.0 (1 review)
3.0
3.0
User Avatar
sir, ready to work. waiting your reply. Thank you
$30 USD in 0 day
4.8 (5 reviews)
3.2
3.2
User Avatar
Please see pm
$30 USD in 1 day
5.0 (1 review)
1.7
1.7
User Avatar
I can do it in one hour ... just let me know if you ready to start!
$70 USD in 1 day
5.0 (1 review)
1.4
1.4
User Avatar
Can finish this today. Feel free to have a look at my profile.
$30 USD in 0 day
5.0 (1 review)
1.4
1.4
User Avatar
Please check your PMB
$40 USD in 1 day
0.0 (0 reviews)
1.0
1.0
User Avatar
Please check PMB, thanks!
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I'm C programmer, i can do it.
$40 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I can do it
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I can do it.
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Please check the PM.
$75 USD in 0 day
0.0 (0 reviews)
0.0
0.0
User Avatar
please check PM
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I obtained 9 for C++ programming. I hope you interested in me.
$30 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
New Hope, United States
0.0
0
Member since Apr 22, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.