We use cookies to give you the best experience possible. By continuing we’ll assume you’re on board with our cookie policy

See Pricing

What's Your Topic?

Hire a Professional Writer Now

The input space is limited by 250 symbols

What's Your Deadline?

Choose 3 Hours or More.
Back
2/4 steps

How Many Pages?

Back
3/4 steps

Sign Up and See Pricing

"You must agree to out terms of services and privacy policy"
Back
Get Offer

Customer’s Bill for a Company

Hire a Professional Writer Now

The input space is limited by 250 symbols

Deadline:2 days left
"You must agree to out terms of services and privacy policy"
Write my paper

AUTHOR: Grace Hopper (Change Grace’s name to yours)

COURSE: CSC 102 Section 1 (Use the correct section number)

Don't use plagiarized sources. Get Your Custom Essay on
Customer’s Bill for a Company
Just from $13,9/Page
Get custom paper

DUE DATE: December 10th, 2010 (Use the correct due date)

REFERENCE: “Computer Science – A structured Programming

Approach using C++”, Forouzan & Gilberg

……………………………………………………….

PURPOSE: Create a customer’s bill for a company.

The company sells only five different products:

TV, VCR, Remote Controller, CD Player, and Tape Recorder.

The Unit prices are $300.00, $120.00, $25.30, $250.00,

and $15.00, respectively. The program must read from

the keyboard the quantity of each piece of equipment purchased.

It then calculates the cost of each item, the subtotal, and

the total cost after a 9 1/8 % sales tax.

INPUT: The input data consists of a set of integers representing

the quantities of each item sold. Theses integers must be input

into the program in a user friendly way; that is, the program must

prompt the user for each quantity. For Example:

How many TV’s were sold?————-* 40

How many VCR’s were sold?————* 25

How many Remote Controls were sold?–* 15

How many CD Player’s were sold?——* 10

How many Tape Recorder’s were sold?–* 5

OUTPUT: The exact required format(based on the input from above)

for the output from the program is shown below:

UNIT TOTAL

QTY DESCRIPTION PRICE PRICE

— ———– —— ——–

40 TV 300.00 12000.00

25 VCR 120.00 3000.00

15 REMOTE CTRL 25.30 379.50

10 CD 250.00 2500.00

5 TAPE RECORDER 50.00 250.00

——–

SUBTOTAL 18129.50

TAX 1654.32

TOTAL 19783.82

Note: Your program does not need to handle quantities greater than 99

nor dollar amounts greater than 99999.99

……………………………………………………….

REMOTE(float) – cost of Remote Contoller

TAPE(float) – cost of Tape Player

TV(float) – cost of Televison

quantity_tv(int)- quantity of TVs inputted by user

quantity_vcr(int)- quantity of VCRsinputted by user

quantity_remote(int)- quantity of Remote Controllers inputted by user

quantity_cd(int)- quantity of CD Players inputted by user

quantity_tape(int)- quantity of Tape players inputted by user

subtotal(float)- total of all items before tax

total(float)- total of all items including tax

total_cd(float)- total cost of all the CD Players

total_remote(float)- total cost of all the Remote Controllers

total_tape(float)- total cost of all the Tape Players

total_tax(float)- sales tax amount

total_tv(float)- total cost of all the TVs

total_vcr(float)- total cost of all the VCRs

//=====================Begin Program Bill==========================

//DON’T FORGET: Output to the screen your name course and section number here!!

//Prompt for and get quantities from the user

cout ** “nHow many TV’s were sold?————-* “;

cout ** “How many VCR’s were sold?————–* “;

cout ** “How many Remote Controls were sold?—-* “;

cout ** “How many CD Player’s were sold?——–* “;

cout ** “How many Tape Recorder’s were sold?—-* “;

total_cd = CD * quantity_cd;

total_vcr =VCR * quantity_vcr;

total_tape = TAPE * quantity_tape;

total_remote = REMOTES * quantity_remote;

subtotal = total_tv * total_vcr * total_remote * total_cd * total_tape;

total = subtotal + total_tax;

cout ** “n t t UNITt TOTAL”** endl;

cout ** “QTYtDESCRIPTIONt PRICEt PRICE” ** endl;

cout ** “—t———–t——t——–” ** endl;

cout ** setw(3) ** quantity_tv ** “tTV t” ** setw(6) ** TV;

** “t” ** setw(8) ** total_tv ** endl;

cout ** setw(4) ** quantity_vcr ** “tVCR t” ** setw(7) ** VCR;

** “t” ** setw(9) ** total_vcr ** endl;

cout ** setw(5) ** quantity_remote ** “tREMOTE CTRL t” ** setw(8) ** REMOTE;

** “t” ** setw(10) ** total_remote ** endl;

cout ** setw(6) ** quantity_cd ** “tCD t” ** setw(9) ** CD;

** “t” ** setw(11) ** total_cd ** endl;

cout ** setw(7) ** quantity_tape ** “tTAPE RECORDERt” ** setw(10) ** TAPE ;

** “t” ** setw(12) ** total_tape ** endl;

cout ** “ttSUBTOTALt” ** setw(18) ** sub_total ** n;

cout ** “ttTAX t” ** setw(18) ** total_tax ** n;

cout ** “ttTOTAL t” ** setw(18) ** total ** n;

//DON’T FORGET: Output to the screen your name course and section number here too!!!

//=====================End Program Bill==========================

Cite this Customer’s Bill for a Company

Customer’s Bill for a Company. (2018, Sep 21). Retrieved from https://graduateway.com/customers-bill-for-a-company/

Show less
  • Use multiple resourses when assembling your essay
  • Get help form professional writers when not sure you can do it yourself
  • Use Plagiarism Checker to double check your essay
  • Do not copy and paste free to download essays
Get plagiarism free essay

Search for essay samples now

Haven't found the Essay You Want?

Get my paper now

For Only $13.90/page