software company sells a package that retails for 599. Quantity discounts are given according to the follow ble. Quantity 10-19 20-49 Discount 20% 30% 50-99 100 or more 40% 50% Vrite a program that asks for teday's date (you MUST use cin >> date. Do not use getline(cin, date)), the ompany name and the quantity they wish to buy and computes the total cost of the purchase. If the user ente egative value for the quantity, tell him/her "invalid quantity". If a zero is entered, tell "Hope you decide to be ur 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 samp run (spacing too). I used 30 spaces for the labels and 10 spaces for the numben [kslotteempress cs111_lec_fall16]s ./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: 1e Invoice for Little Coffee Shop Price before discount Discount Total Due 990. ee 198. ee 792. ee [ks lottempress cs111_lec_fall161s 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 "Assgignment 3: runs for software.cpp" and print them out. Try not to have redundancy in your code. You will lose some points if you dol BAD iff......) Better way i. ) var -1;

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question
<Program 1: 50 points> software.cpp
A software company sells a package that retails for $99. Quantity discounts are given according to the following
table.
Quantity
10-19
20-49
50-99
100 or more
Discount
20%
30%
40%
50%
Write a program that asks for teday'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.
[kslotteempress cs111_lec_fall16]s ./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
Discount
Total Due
990.ee
198.ee
792.e0
[ks lotteempress cs111_lec_fall161s
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
"Assgignment 3: runs for software.cpp" and print them out.
Try not to have redundancy in your code. You will lose some points if you dol
BAD
if....)
Better way
if...)
var -1;
else ifl.)
var-2:
else ifl.)
var -3;
answer - num + 1;
cout << "answer is"<<answer,
else ifl .)
Transcribed Image Text:<Program 1: 50 points> software.cpp A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity 10-19 20-49 50-99 100 or more Discount 20% 30% 40% 50% Write a program that asks for teday'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. [kslotteempress cs111_lec_fall16]s ./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 Discount Total Due 990.ee 198.ee 792.e0 [ks lotteempress cs111_lec_fall161s 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 "Assgignment 3: runs for software.cpp" and print them out. Try not to have redundancy in your code. You will lose some points if you dol BAD if....) Better way if...) var -1; else ifl.) var-2: else ifl.) var -3; answer - num + 1; cout << "answer is"<<answer, else ifl .)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT