Question

In: Computer Science

programming language is in excel VB8 Program 2: Software Sales A software company sells three packages,...

programming language 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

programming language is in excel VB8

Solutions

Expert Solution

Program:

Public Class Form1

'Calculate button calculates the order details for each 'package

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click

'Declare the variables for calculation

Dim pacA As Double = 99

Dim pacB As Double = 199

Dim pacC As Double = 299

Dim valA As Double

Dim valB As Double

Dim valC As Double

Dim packageA As Integer

Dim packageB As Integer

Dim packageC As Integer

packageA = CInt(TxtPacA.Text)

packageB = CInt(TxtPacB.Text)

packageC = CInt(TxtPacC.Text)

lblResult.Text = ""

'If condition to check the inputs from user for 'package A

If IsNumeric(packageA) And packageA > 0 Then

'Select Case statement for package A

Select Case (packageA)

Case Is > 100

valA = (pacA - (pacA * 0.5)) * packageA

Case 10 To 19

valA = (pacA - (pacA * 0.2)) * packageA

Case 20 To 49

valA = (pacA - (pacA * 0.3)) * packageA

Case 50 To 99

valA = (pacA - (pacA * 0.4)) * packageA

End Select

'If condition to check the inputs from user for 'package B

If IsNumeric(packageB) And packageB > 0 Then

Select Case (packageB)

'Select Case statement for package B

Case Is > 100

valB = (pacB - (pacB * 0.5)) * packageB

Case 10 To 19

valB = (pacB - (pacB * 0.2)) * packageB

Case 20 To 49

valB = (pacB - (pacB * 0.3)) * packageB

Case 50 To 99

valB = (pacB - (pacB * 0.4)) * packageB

End Select

'If condition to check the inputs from 'user for package C

If IsNumeric(packageC) And packageC > 0 Then

Select Case (packageC)

'Select Case statement for package C

Case Is > 100

valC = (pacC - (pacC * 0.5)) * packageC

Case 10 To 19

valC = (pacC - (pacC * 0.2)) * packageC

Case 20 To 49

valC = (pacC - (pacC * 0.3)) * packageC

Case 50 To 99

valC = (pacC - (pacC * 0.4)) * packageC

End Select

'Display the order amount, total 'amount in the resultant label

lblResult.Text = "Package A:" & FormatCurrency(valA) & vbCrLf & "Package B:" & FormatCurrency(valB) & vbCrLf & "Package C:" & FormatCurrency(valC) & vbCrLf & "Grand Total:" & FormatCurrency(valA + valB + valC)

End If

End If

End If

End Sub

'Clear button clears the contents of packages

Private Sub btnClear_Click(sender As Object, e As ‘ EventArgs) Handles btnClear.Click

'Clear the contents

TxtPacA.Text = ""

TxtPacB.Text = ""

TxtPacC.Text = ""

lblResult.Text = ""

End Sub

'Exit button to close the application

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click

'Close the form.

Me.Close()

End Sub

End Class

Sample Output:


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...
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...
#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...
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...
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...
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., used multiple regression analysis to predict gross revenue (y) as a function of television advertising (x1) and newspaper advertising (x2). Values of y, x1, and x2 are expressed in thousands of dollars. Weekly Gross Revenue ($1000s) Televison Advertising ($1000s) Newspaper Advertising ($1000s) 96 5 1.5 90 2 2    95 4 1.5 92    2.5 2.5 95 3 3.3 94    3.5 2.3...
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. 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...
CODE IN JAVA A computer company sells software and computer packages for $75. Quantity discounts are...
CODE IN JAVA A computer company sells software and computer packages for $75. Quantity discounts are given based on the following criteria: Quantity          Discount 10 - 19             20% 20 - 49             30% 50 - 99             40% 100 or more    50% Be sure the user is presented with all necessary information, then prompt the user for the quantity of packages. Display the total cost of the purchase making sure to apply appropriate discounts. Example Output: Demon software and computers is offering...
Programming language: C++   suggested software: Code::Blocks Develop an algorithm and write a C++ program that computes...
Programming language: C++   suggested software: Code::Blocks Develop an algorithm and write a C++ program that computes the final score of a baseball game. Use a loop to read the number of runs scored by both teams during each of nine innings. Display the final score afterward. Submit your design, code, and execution result via file, if possible
#1) Use computer software packages, such as Excel, to solve this problem. The owner of Showtime...
#1) Use computer software packages, such as 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. Weekly Gross Revenue ($1,000s) Television Advertising ($1,000s) Newspaper Advertising ($1,000s) 105 5.0 1.5 90 2.0 2.0 95 4.0 1.5 92 2.5 2.5 93 3.0 3.3 94 3.5 2.3 94 2.5 4.2 a) Develop an estimated regression equation with the amount of television advertising as the independent variable (to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT