/************************software.cpp**********************/
#include<iostream>
#include<string>
using namespace std;
int main(){
const float PACKAGE_RATE = 99.00;//decalre constant
for Package rate
string date,companyName; //for date and company
name
int quantity; //for quantityt
float grossPay = 0,total = 0,discount = 0,discountRate
= 0;//calculation
//prompt
cout<<"Enter today's date (mm/dd/yy): ";
cin>>date;
cout<<"Enter your compay name: ";
cin>>companyName;
getline(cin,companyName); //company name
cout<<"Enter the quantity you would like to
purchase: ";
cin>>quantity;
/*
* condition for discount and validation
*
*/
if(quantity<0){
cout<<"Invalid
quantity";
exit(0);
}
else if(quantity==0){
cout<<"Hope you decide to buy
our software in future.";
exit(0);
}
else if(quantity<10){
discountRate = 0;
}
else
if(quantity>=10&&quantity<20){
discountRate = 20;
}
else
if(quantity>=20&&quantity<50){
discountRate = 30;
}
else
if(quantity>=50&&quantity<100){
discountRate = 40;
}
else if(quantity>50){
discountRate = 50;
}
//calculation
grossPay = quantity * PACKAGE_RATE;
discount = grossPay * discountRate/100;
total = grossPay - discount;
//display invoice
cout<<"Invoice for
"<<companyName<<endl;
cout<<"Price before
discount\t\t$\t"<<grossPay<<endl;
cout<<"Discount\t\t\t$\t"<<discount<<endl;
cout<<"Total
Due\t\t\t$\t"<<total<<endl;
return 0;
}
/**********************output*********************/
Enter today's date (mm/dd/yy): 09/27/16
Enter your compay name: Little Coffee Shop
Enter the quantity you would like to purchase: 10
Invoice for Coffee Shop
Price before discount $ 990
Discount $ 198
Total Due $ 792
--------------------------------
Process exited after 23.34 seconds with return value 0
Press any key to continue . . .
Please let me know if you have any doubt or modify the answer, Thanks :)
<Program 1: 50 points> software.cpp A software company sells a package that retails for $99. Quantity...
Part II – Cost Calculator (15 Points) A software company sells a package that retails for $ 99. Quantity discounts are given according to the following table: Quantity Discount 10 to 19 20% 20 to 49 30% 50 to 99 40% 100 or more 50% Write a program that asks the user to enter the number of packages purchased. The program should then display the discount percentage, amount of the discount (can be 0) and the total amount of the...
Computer science help! A software company sells their software packages for $99.00 each. They would like you to write a program that will calculate and display an invoice for their customers. Quantity discounts are given according to the following table: Quantity Discount 1 - 9 No discount 10 – 19 20% 20 – 49 30% 50 - 99 40% 100 or more 50% Write a C++ program that asks for the customer’s name and the number of software packages sold...
Write in python code Project 11-1: Birthday Calculator Create a program that accepts a name and a birth date and displays the person's birthday the current day, the person's age, and the number of days until the person's next birthday Console Birthday Calculator Enter name: Joel Enter birthday (MM/DD/YY): 2/4/68 Birthday: Sunday, February 04, 1968 Today: Joel is 48 years old. Joel's birthday is in 73 days Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Django Enter birthday (MM/DD/YY):...
Requires Python to answer A client wishes to keep track of his investment in shares. Write a program to help him manage his stock portfolio. You are to record both the shares that he is holding as well as shares that he has sold. For shares be is curreatly holding, record the following data: .a 3-character share code, share name, last purchase date, volume currently held and average purchase price (refer to description under part cii) option 2) For shares...
oracle only database: DROP TABLE ORDERITEMS; DROP TABLE Orders; DROP TABLE BOOKAUTHOR; DROP TABLE BOOKS; DROP TABLE PROMOTION; DROP TABLE AUTHOR; DROP TABLE CUSTOMERS; DROP TABLE PUBLISHER; CREATE TABLE Customers ( Customer# NUMBER(4), LastName VARCHAR2(10) NOT NULL, FirstName VARCHAR2(10) NOT NULL, Email VARCHAR(40), Address VARCHAR2(20), City VARCHAR2(12), State VARCHAR2(2), Zip VARCHAR2(5), Referred NUMBER(4), Region CHAR(2), CONSTRAINT customers_customer#_pk PRIMARY KEY(customer#) ); INSERT INTO CUSTOMERS VALUES (1001, 'MORALES', 'BONITA', '[email protected]', 'P.O. BOX 651', 'EASTPOINT', 'FL', '32328', NULL, 'SE'); INSERT INTO CUSTOMERS VALUES...
An online company sells hundreds of office supply products on its e-Commerce store. It has asked you to design and implement a sales order processing system which will be used by users in our Operations department to process sales orders. Here is an overview of the sales order process. Customers make purchases by placing orders. Each customer has a customer number and profile (such as name, shipping address). To simplify the matter, each time an order is placed, only one...
In this project you will write a C++ program that simulates the purchase of a single item in an online store. What to do Write a C++ program that: 1. Prints out a welcome message. 2. Prompts the user for the following information: (a) Their first name (example: Roger) (b) Their last name (example: Waters) (c) The name of the product (example: Brick) (d) The unit price of the product (example: 1.99) (e) The quantity to buy (example: 200) (f)...
making a file You are tasked with creating a text-based program for storing data on Hotel Room Bookings - however, as this is a comparative languages course, you will be creating the same application in the following three programming languages: • Java, • Python, and • Lisp As you implement the application in each language you should keep notes on: - The features of the languages used, - Which features you found useful, and - Any issues or complications which...
Exercise B-09 Nash Company sells one product. Presented below is information for January for Nash Company, Jan. 1 Inventory 102 units at $5 each 4 Sale 81 units at $8 each 11 Purchase 158 units at $6 each 13 Sale 126 units at $9 each 20 Purchase 152 units at $6 each 27 Sale 98 units at $10 each Nash uses the FIFO cost flow assumption. All purchases and sales are an account. Your answer is correct. Assume Nash uses...
Need three seperate files. ShoppingCartManager.java ShoppingCart.java ItemsToPurchase.java These are from part 1 what do you mean by deep study 7.25 LAB*: Program: Online shopping cart (Part 2) Note: Creating multiple Scanner objects for the same input stream yields unexpected behavior. Thus, good practice is to use a single Scanner object for reading input from System.in. That Scanner object can be passed as an argument to any methods that read input This program extends the earlier Online shopping cart program (Consider...