Question

In: Computer Science

Software Sales A software company sells three packages, Package A, Package B, and Package C, which...

Software Sales A software company sells three packages, Package A, Package B, and Package C, which retail for $99, $199, and $299, respectively. Quantity discounts are given according to the following table: Quantity Discount 10 through 19 20% ,20 through 49 30% ,50 through 99 40% ,100 or more 50% . Create a C++ program that allows the user to enter the number of units sold for each software package. The application should calculate and display the order amounts and the grand total. Input validation: Make sure the number of units for each package is not negative.

Use the following test data to determine if the application is calculating properly: Units Sold Amount of Order Package A: 15 units Package A: $1,188.00

Package B: 75 units Package B: $8,955.00

Package C: 120 units Package C: $17,940.00

Grand Total: $28,083.00

Solutions

Expert Solution

#include<iostream>
using namespace std;
int getDiscount(int quantity,int price){
                int total = quantity * price;
                
                if(quantity>=10 && quantity<20)
                        return total * 0.2;
                if(quantity>=20 && quantity<50)
                        return total * 0.3;
                if(quantity>=50 && quantity<100)
                        return total * 0.4;
                if(quantity>=100)
                        return total * 0.5;
                return 0;
}
int main(){
        const int PRICEA=99;
        const int PRICEB=199;
        const int PRICEC=299;
        int quantityA,quantityB,quantityC;
        cout<<"Enter quantity for package A: ";
        cin>>quantityA;
        cout<<"Enter quantity for package B: ";
        cin>>quantityB;
        cout<<"Enter quantity for package C: ";
        cin>>quantityC;
        int totalA= quantityA * PRICEA-getDiscount(quantityA,PRICEA);
        int totalB= quantityB * PRICEB-getDiscount(quantityB,PRICEB);
        int totalC= quantityC * PRICEC-getDiscount(quantityC,PRICEC);
        int grandTotal = totalA + totalB + totalC;
        cout<<"Package A: "<<quantityA<<" units Package A: $"<<totalA<<endl;
        cout<<"Package B: "<<quantityB<<" units Package B: $"<<totalB<<endl;
        cout<<"Package C: "<<quantityC<<" units Package C: $"<<totalC<<endl;
        cout<<"Grand Total: $:"<<grandTotal;
        
}

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.

I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME


Related Solutions

this is in excel VB8 Program 2: Software Sales A software company sells three packages, Package...
this is in excel VB8 Program 2: Software Sales A software company sells three packages, Package A, Package B, and Package C, which retail for $99, $199, and $299, respectively. Quantity discounts are given according to the following table: Quantity Discount 10 through 19 20% 20 through 49 30% 50 through 99 40% 100 or more 50% Create an application that allows the user to enter the number of units sold for each software package. The application should calculate and...
Amazon has three packages (Package A, Package B, and Package C) that is to be shipped...
Amazon has three packages (Package A, Package B, and Package C) that is to be shipped to Bill’s address. Package A is worth $100, Package B is worth $200, and Package C is worth $300. All three packages have a 90% chance of arriving and a 10% chance of being lost in transit. a. Set up a probability distribution with the appropriate probabilities for each possible outcome. b. What is the expected loss (P*)? c. How much risk does Amazon...
Task #1 – Software Sales A software company sells a package that retails for $99. Quantity...
Task #1 – Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following: Quantity Discount 1 - 9 NO DISCOUNT 10 – 19 20% 20 – 49 30% 50 – 99 40% 100 or more 50% Your program calculates the final purchase price of the software packages based on the quantity purchased. If a value of 0 or less (a negative number) is entered, display the message “Invalid Quantity” and...
A company sells packages of cookies with the following promotion. If two cookies in a package...
A company sells packages of cookies with the following promotion. If two cookies in a package are frostingless, you may get your money back. Suppose each cookie has a 1 100 chance of being frostingless and there are 20 cookies in a package. (a) What is the expected number of frostingless cookies in a package? 5 packages? (b) What is the variance in this number for one package? 5 packages? (c) What is the probability of returning at least one...
Design the logic in pseudocode for Bugz App software company that sells a software package as...
Design the logic in pseudocode for Bugz App software company that sells a software package as follows. 1. The retail price of the package is $99 2. Quantity discounts are given on purchases of 10 or more units as follows The program must allow the user to enter the customer’s name and number of units purchased, and output the original cost of the units purchased, the percentage discount given, the dollar amount of the discount given, and the final cost...
A company sells three products A, B and C in a 3:3:4 sales mix. Sales price:       ...
A company sells three products A, B and C in a 3:3:4 sales mix. Sales price:        A - $10 B -$8    C - $6 Variable cost:     A - $7 B- $3      C - $3    Quantity sold   A 6,000 B6000 C8000 Fixed costs are $36,000 A) 6% - Calculate breakeven in total sales dollars and in units of the 3 products B) 5% - What is the total income the company can earn with this sales mix?              Say the sales...
An airline wants to select a computer software package for its reservation system. Four software packages...
An airline wants to select a computer software package for its reservation system. Four software packages (1, 2, 3, and 4) are commercially available. The airline will choose the package that bumps as few passengers, on the average, as possible during a month. An experiment is set up in which each package is used to make reservations for 5 randomly selected weeks. (A total of 20 weeks was included in the experiment.) The number of passengers bumped each week is...
========================================================================= A software company sells a package that retails for $99. Quantity discounts are given according...
========================================================================= 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% 50–99 40% 100 or more 50% Write a program that asks for the number of units sold and computes the total cost of the purchase. Input Validation: Make sure the number of units is greater than 0. ========================================================================= the pseudo code is: There comes situations in real life when we need to make some...
Alpha Company is selling three products: A, B and C. The company sells three units of...
Alpha Company is selling three products: A, B and C. The company sells three units of A for every unit of C, and two units of B for every unit of A. Fixed costs are 720,000 Contribution margins are: A - 1.90 B - 2 C - 2.30 How many units of B would the company sell at break even point?
Question: JB Company sells three products — A, B, and C — with contribution margins of...
Question: JB Company sells three products — A, B, and C — with contribution margins of $2.5, $1, and $2, respectively. The fixed costs for the period are $128. Preliminarily, the company has three versions of forecast for the coming period as follows: Forecast One: The forecast sales of 200 units in the coming period, consisting of 40 units of A, 100 units of B, and 60 units of C. Forecast Two: The forecast sales of 220 units in the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT