Question

In: Computer Science

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 display the order amounts and the grand total. ENGR 1100 Asignación #2 - DECISIONS Deadline: Lunes 19 de octubre 2020, 11:50pm 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

this is in excel VB8

Solutions

Expert Solution

#include "Utility.h"

int main()
{
    /* Hold constant for retail price */
    const float RETAIL_PRICE = 99.0;

    /* Hold sales, quantity and discount */
    float quantity,
        discount,
        sumTotal;

    /* Ask the user for the quantity sold */
    cout << "Enter the amount of units sold: ";
    cin >> quantity;

    /* Format the output */
    cout << fixed << showpoint << setprecision(2);

    if (quantity > 0 && quantity < 10)
    {
        sumTotal = (quantity * RETAIL_PRICE);
        cout << "Sum Total: $" << sumTotal << endl;
    }
    else if (quantity >= 10 && quantity <= 19)
    {
        discount = (quantity * RETAIL_PRICE) * .2;
        sumTotal = (quantity * RETAIL_PRICE) - discount;
        cout << "Sum Total: $" << sumTotal << endl;
    }
    else if (quantity >= 20 && quantity <= 49)
    {
        discount = (quantity * RETAIL_PRICE) * .3;
        sumTotal = (quantity * RETAIL_PRICE) - discount;
    }
    else if (quantity >= 50 && quantity <= 99)
    {
        discount = (quantity * RETAIL_PRICE) * .4;
        sumTotal = (quantity * RETAIL_PRICE) - discount;
        cout << "Sum Total: $" << sumTotal << endl;
    }
    else if (quantity >= 100)
    {
        discount = (quantity * RETAIL_PRICE) * .5;
        sumTotal = (quantity * RETAIL_PRICE) - discount;
        cout << "Sum Total: $" << sumTotal << endl;
    }
    else
    {
        cout << "The quantity must be greater than 0.\n";
    }

    pauseSystem();
    return 0;
}


Related Solutions

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...
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...
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...
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...
#2) Use computer software packages, such as Excel, to solve this problem. Consider the following data...
#2) Use computer software packages, such as Excel, to solve this problem. Consider the following data for a dependent variable y and two independent variables, x1 and x2. x1 x2 y 30 12 95 46 11 108 24 18 113 51 16 178 40 6 94 52 19 175 74 8 170 36 12 117 60 14 142 77 17 211 a) If you ran a multiple regression model using both independent variable what would the p-value of the overall...
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...
Use computer software packages, such as Excel, to solve this problem. The Jacobs Chemical Company wants...
Use computer software packages, such as Excel, to solve this problem. The Jacobs Chemical Company wants to estimate the mean time (minutes) required to mix a batch of material on machines produced by three different manufacturers. To limit the cost of testing, four batches of material were mixed on machines produced by each of the three manufacturers. The times needed to mix the material follow. Manufacturer 1 Manufacturer 2 Manufacturer 3 17 29 17 23 27 16 21 32 20...
Describe any three program modules common to an accounting system software package.
Describe any three program modules common to an accounting system software package.
Use computer software packages, such as Minitab or Excel, to solve this problem. The owner of...
Use computer software packages, such as Minitab or Excel, to solve this problem. The owner of Showtime Movie Theaters, Inc., would like to predict weekly gross revenue as a function of advertising expenditures. Historical data for a sample of eight weeks follow. Weekly Television Newspaper Gross Revenue Advertising Advertising ($1,000s) ($1,000s) ($1,000s) 101 5.0 1.5 90 2.0 2.0 95 4.0 1.5 92 2.5 2.5 96 3.0 3.3 94 3.5 2.3 94 2.5 4.2 101 3.0 2.5 a. Develop an estimated...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT