Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

software.cpp A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity Discount 10-19 20% 20-49

image text in transcribed
software.cpp A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity Discount 10-19 20% 20-49 30 $0.99 40% 100 or more 50% Write a program that asks for day's date (you MUST use cin>> date. Do not use getline(cin, date)), the company name and the quantity they wish to buy and computes the total cost of the purchase. If the user enters a negative value for the quantity, tell him/her "invalid quantity". If a zero is entered, tell "Hope you decide to buy our software in the future. Otherwise display an invoice in the same format shown below. Your prompts and outputs have to look exactly the same as the following sample run (spacing too). I used 30 spaces for the labels and 10 spaces for the numbers. [kslott empress cs111_lec_fall16]$ ./a.out Enter today's date (mm/dd/yy): 09/27/16 Enter your company name: Little Coffee Shop Enter the quantity you would like to purchase: 10 Invoice for Little Coffee Shop Price before discount $ 990.ee Discount $ 198.ee Total Due 792. [kslottoempress c5111_lec_fall1615 For this program, you need to make up your own test cases using the boundary checking technique. Use the separate paper provided in class to show that you tested your program with your own test cases and tell whether or not your program produced the right result for each test case. Also test your program using the test cases provided in the document named "Assignment 3: runs for software.cpp" and print them out. you Try not to have redundancy in your code. You will lose some points BAR Better way else if...) cout answer is awer else if....) var else if(..........) 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions

Question

percent of sales method?

Answered: 1 week ago