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...
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...
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...
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...
A company produces and sells three types of products A, B, and C. The table below...
A company produces and sells three types of products A, B, and C. The table below shows the selling price per unit and the total demand for each product type. $/unit Demand A 5 300 B 6 250 C 7 200 For this purpose, the company can commission any of 7 plants with varying costs. Furthermore, each plant has a fixed capacity (in units) regardless of the type of product made. Production costs and capacities for each of the six...
A company produces three different type of chocolates. A, B, and C. The sales volume for...
A company produces three different type of chocolates. A, B, and C. The sales volume for A is at least 50 % of the total sales of all three chocolates. However, the company cannot sell more than 75 units of A per day. The three types of chocolate use one raw material, of which the maximum daily availability is 240 lb. The usage rates of the raw material are 2 lb per unit of A, 4 lb per unit of...
FCA Company“ produces and sells three products (A), (B) and (C).The following data and information are...
FCA Company“ produces and sells three products (A), (B) and (C).The following data and information are now accessible for the last year ended December 31, 2015: (A) (B) ( C ) Sale Revenue ( in 1000’s LE ) 1600 1,000 1250 Contribution margin per unit ( in LE ) 24 20 5 Contribution margin ratio 30% 40% 20% The total special fixed costs of the last year ( in 1000's LE) 200 150 300 The share of the total of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT