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;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education