Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following ubie: Quantity Discount XXXXXXXXXX% XXXXXXXXXX% XXXXXXXXXX% 100 or more...

1 answer below »
Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following ubie: Quantity Discount XXXXXXXXXX% XXXXXXXXXX% XXXXXXXXXX% 100 or more 50% Create an application that lets the user enter the number of packages purchased The program should then display the amount of the discount (if any) and the tota amount of the purchase after the discount. Debug Format Test Analyze Tools Extensions Window Debug Help Search = = = = TT H || Any CPU Start ? Form1.cs* 1 Form1.cs (Design) + X 0 Scaling on your main display is set to 200%. Restart Visual Studio with 100% scalir Form 1 Number of packages purchased: Calculate Exit Error List Entire Solution X 4 Errors 1 Warning 0 0 of 2 Messages * Search Error List File Code Description Project missing a using directive or an assembly reference?) The variable discount' is CS0219 assigned but its value is never
Answered 142 days After May 03, 2022

Solution

Robert answered on Sep 23 2022
69 Votes
01
    import java.util.Scanner;
    02
    
    03
    public class SoftwareSales
    04
    
    05
    {
    06
    public static void main(String[] args)
    07
    {
    08
    Scanner input = new Scanner(System.in);
    09
    int quantity;
    10
    double retailPrice = 99;
    11
    double discountPerc, purchaseCost, totalDiscount, totalCost;
    12
    
    13
    
    14
    
Ask user for inputs
    15
    
    16
    System.out.print ("Enter the quantity purchased: ");
    17
    quantity = input.nextInt();
    18
    
    19
    
    20
    
    21
    
if/else statements
    22
    
    23
    if (quantity >= 10 && quantity <= 19)
    24
    {
    25
    
    26
    
    27
    purchaseCost = quantity * 99;
    28
    totalDiscount = purchaseCost * 0.8;
    29
    totalCost = purchaseCost -...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here