Visual Basic net pay and revenue calculation exercises
¶ … Visual Basic Programming and Algorithm
Solution to Chapter 5 Exercise
Code of Net Pay Project
' Purpose: To display Net Pay
' Programmer: on
Public Class Form1
Private Sub-Label1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub-Label2_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
Private Sub-Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub-TextBox3_TextChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
End Sub
Private Sub-Label3_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click
End Sub
End Class
Solution to Chapter 5 Exercise 5
Code of Net Pay Project
' Purpose: To display total cellular ordered ' Programmer: on
Public Class Form1
Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub-TextBox2_TextChanged (ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub-Button4_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End Sub
End Class
Chapter 6: Exercises 1
Private Sub-btnCalc_Click (sender As Object,
e As EventArgs) Handles btnCalc.Click
' calculates and displays the annual net income
Dim decRevenue As Decimal
Dim decExpenses As Decimal
Dim decNetIncome As Decimal
Decimal.TryParse (txtRevenue.Text, decRevenue)
Decimal.TryParse (txtExpenses.Text, decExpenses)
decNetIncome = decRevenue -- decExpenses
lblNetIncome.Text = decNetIncome.ToString ( "C2")
End Sub
(Zak, 2014).
Chapter 6: Exercises 6
Output: amount of revenue generated for Orchestra, Main floor, and Balcony categories
Input: number of ticket sold for Orchestra
number of ticket sold for Main floor
number of ticket sold for Balcony
Algorithm:
1. enter the cost of Orchestra seating
2. enter the cost of Main floor seating
3. enter the cost of Balcony seating
Create your account
Always verify citation format against your institution’s current style guide requirements.