A
Arcthaw
Guest
Hello, this is my first post. I'm having an issue with this assignment I'm working on. I need to create an interface (which is done) to display the total cost of the weight of meat in 4, 5, and 6 ounce intervals, followed by quantity of 8 or 16. I have the first part of my code complete which will be provided below for you to see, I just need to know where and how to implement a 5% tax to the total.
Option Explicit On
Option Strict On
Option Infer Off
Public Class Form1
Private Sub displayButton_Click(sender As Object, e As EventArgs) Handles displayButton.Click
Const fourtoeight As Double = 99.0
Const fourtosixteen As Double = 179.0
Const fivetoeight As Double = 119.0
Const fivetosixteen As Double = 219.0
Const sixtoeight As Double = 134.0
Const sixtosixteen As Double = 249.0
Dim eight As Double = 8
Dim sixteen As Double = 16
Dim totalCost As Double
' determine price by weight and quantity
If fourRadioButton.Checked Then
If eightRadioButton.Checked Then
totalCost = fourtoeight * eight
Else
totalCost = fourtosixteen * sixteen
End If
End If
priceLabel.Text = totalCost.ToString("C2")
End Sub
End Class
Continue reading...
Option Explicit On
Option Strict On
Option Infer Off
Public Class Form1
Private Sub displayButton_Click(sender As Object, e As EventArgs) Handles displayButton.Click
Const fourtoeight As Double = 99.0
Const fourtosixteen As Double = 179.0
Const fivetoeight As Double = 119.0
Const fivetosixteen As Double = 219.0
Const sixtoeight As Double = 134.0
Const sixtosixteen As Double = 249.0
Dim eight As Double = 8
Dim sixteen As Double = 16
Dim totalCost As Double
' determine price by weight and quantity
If fourRadioButton.Checked Then
If eightRadioButton.Checked Then
totalCost = fourtoeight * eight
Else
totalCost = fourtosixteen * sixteen
End If
End If
priceLabel.Text = totalCost.ToString("C2")
End Sub
End Class
Continue reading...