User Quantitytape Quantity Of Tape Players example essay topic
805 words
/ APPLICATION: Bill Report FILE NAME: Bill. cpp AUTHOR: Grace Hopper (Change Grace's name to yours) COURSE: CSC 102 Section 1 (Use the correct section number) INSTRUCTOR: Elizabeth Hutchison DUE DATE: December 10th, 2010 (Use the correct due date) REFERENCE: "Computer Science - A structured Programming Approach using C++", Forouzan & Gilbert (List any other references. )... 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.3 TOTAL 19783.82 Note: Your program does not need to handle quantities greater than 99 nor dollar amounts greater than 99999.99... DICTIONARY: constants: CD (float) - cost of CD Player REMOTE (float) - cost of Remote Controller TAPE (float) - cost of Tape Player TAX (float) - sales tax rate TV (float) - cost of Televison VCR (float) - cost of VCR variables: quantitytv (int) - quantity of TVs inputted by user quantityvcr (int) - quantity of VCRs inputted by user quantityremote (int) - quantity of Remote Controllers inputted by user quantitycd (int) - quantity of CD Players inputted by user quantitytape (int) - quantity of Tape players inputted by user subtotal (float) - total of all items before tax total (float) - total of all items including tax totalcd (float) - total cost of all the CD Players totalremote (float) - total cost of all the Remote Controllers totaltape (float) - total cost of all the Tape Players totaltax (float) - sales tax amount totaltv (float) - total cost of all the TVs totalvcr (float) - total cost of all the VCRs / Begin Program Bill #include i ostream. h #include io manip. h //Global Declarations const TV = 300.00; const VCR = 120.00; const REMOTE = 25.80; const CD = 250.00; const TAPE = 50.00; const TAX = 9 + 1/8; int main (vid) { // Local Declarations integer quantitytv; integer quantityvcr; integer quantityremote; integer quantityCD; integer quantitytape; float subtotal; float total; float totaltv; float totalvcr; float totalremote; float totalcd; float totaltape; float tax total; //DON'T FORGET: Output to the screen your name course and section number here!! //Prompt for and get quantities from the user cout "how many TV's were sold "; cin quantity; cout "How many VCR's were sold "; cin quantity; cout "How many Remote Controls were sold -- "; cin quantity; cout "How many CD Player's were sold -- - "; cin quantity; cout "How many Tape Recorder's were sold -- "; cin quantitytape; //Calculate the totals totalcd = CD quantitycd; totaltv = TV quantitytv totalvcr = VCR quantityvcr; totaltape = TAPE quantitytape; totalremote = REMOTES quantityremote; subtotal = totaltv totalvcr totalremote totalcd totaltape; total = subtotal + totaltax; totaltax = subtotal + TAX; Display results to the screen cout setiosflags (ios: : fixed); cout set precision (2); //Print headings cout "n t t Unit TOTAL" endl; cout "QTYtDESCRIPTIONt Price PRICE" endl; cout "-t -- -- t -- t -- -" endl; //Print itemization cout setw (3) quantitytv "tTV t" setw (6) TV; "t" setw (8) totaltv endl; cout setw (4) quantityvcr "vcr t" setw (7) VCR; "t" setw (9) totalvcr endl; cout setw (5) quantityremote "remote CTRL t" setw (8) REMOTE; "t" setw (10) totalremote endl; cout setw (6) quantitycd "tCD t" setw (9) CD; "t" setw (11) totalcd endl; cout setw (7) quantitytape "tape Recorder" setw (10) TAPE; "t" setw (12) totaltape endl; //Print totals cout " -- -" endl; cout "ttSUBTOTALt" setw (18) subtotal n; cout "tt TAX t" setw (18) totaltax n; cout "tt TOTAL t" setw (18) total n; //DON'T FORGET: Output to the screen your name course and section number here too! return; } //end main End Program Bill.
Things every student should keep in mind
- Free example essays found anywhere online are available to anyone, which makes them used, re-used, paraphrased, and abused millions of times.
- Watch out, some are poorly written!
- We strongly discourage you to submit free essays or any of their parts for credit at your school -- they are easily detected by PLAGIARISM CHECKERS.
- Get a brand-new, 100% original paper that will be written especially for you following YOUR EXACT instructions.
100% money back, no questions asked if you paper is plagiarized (this won't happen anyway).
We use a simple but effective principle: one satisfied customer will come back for more, but one who was cheated and misled will tell 10 others too.
Our clients are treated with the highest level of respect that a legitimate student deserves. You, as a customer, will feel this attitude starting from your first contact with our essay service and all the way through.
A significant percentage of cheap essay writing services have also been the source of complaints from students for selling cut and pasted work off the net -- this is a world away from the personalized essay service that EssayPride offers. All our guarantees are always kept -- we are nothing without quality, affordable prices, and the high degree of customer satisfaction!
What our customers say
Piotr S.
Toronto, Canada
I am an ESL student and I am only learning how to write good papers in English. Thanks to EssayPride I am mastering this skill much faster. They help me because they always respond any questions and explain me things I do not understand. They also strictly follow the deadlines and I am never late with my assignments. Thank you very much, guys, your hard work is appreciated. I will surely be ordering more.
Lindsay M.
Winston Salem, NC
Oh my Gosh! My life has become sooo much easier after I've come across this website. I am a working student, so sometimes I am too overwhelmed with so many things and I really need a hand with my papers. I am glad I have found a company I can trust. I have confidence in these guys, because they proved to be good quite a few times.
Kirk N.
Austin, TX
I never leave reviews for products or services because I am quite particular and picky. Surprisingly enough, EssayPride has managed to satisfy all of my requirements, even though I asked for several alterations to the paper they've sent initially. My assignments are quite complicated and it is essential to possess a certain level of knowledge in order to write a decent paper. These guys have managed, so I give them four stars.
Emma Ch.
Birmingham, UK
Customer service is very responsive to your queries, they answer any question within an hour. Even if you have a problem with an order, you can contact them and they will fix it promptly. The quality of writing is very good, writer knows what he is talking about. I had a very positive experience using this website, I will be a returning customer.
Travis J.
Perth, Australia
I used this website more than once and every time my experience turned out to be extremely positive. I think their price-quality ratio is very good, because I couldn't find anyone writing better than these guys, who would work for this money. Thank you!
Myung O.
Seoul, South Korea
I am a Korean student studying in the US. I would like to thank essaypride staff, especially writer Jeff P., for helping me out so much. My grades are good with all your help and I keep calm about the results of my year.
Boyi Zh.
St. Louis, MO
As probably any student, I was quite hesitant about asking somebody else to do my assignments at first. However, after EssayPride has sent me my first paper and I've read it, I understood that I could actually learn a lot from them. The research they've done was impressive and I understood the topic even better than after going to class and reading my textbook. I am not using this website to "cheat", I am using it as a tutoring service, they help me to understand the material better.