Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

iii. the net sales amount. Public Class MainForm Private Function ComputeDiscount ( ByVal quantity As Integer ) As Double Dim discount As Double If quantity

iii. the net sales amount.
Public Class MainForm
Private Function ComputeDiscount(ByVal quantity As Integer) As Double
Dim discount As Double
If quantity 101 Then
discount =0.10
Elself quantity 26 Then
discount =0.08
Elself quantity 11 Then
discount =0.05
Else
discount =0
End If
Return discount
End Function
Private Sub ComputeSalesButton_Click(sender As Object, e As EventArgs) Handles ComputeSalesButton.Click
Dim price As Double
Dim quantity As Integer
Dim grossSales As Double
Dim discount As Double
Dim netSales As Double
' Parse input values
If Double.TryParse(ItemPriceTextBox.Text, price) AndAlso Integer.TryParse(QuantitySoldTextBox.Text, quantity) Then
' Compute gross sales
grossSales = price * quantity
' Compute discount
discount = ComputeDiscount (quantity)
' Compute net sales
netSales = grossSales * discount
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

What language did you speak in your home when you were?

Answered: 1 week ago

Question

2. What process will you put in place to address conflicts?

Answered: 1 week ago