I cant figure out what's wrong with my code. I need help on fixing it  TG Automotive Problem for Visual Basic. Page 424.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I cant figure out what's wrong with my code. I need help on fixing it 

TG Automotive Problem for Visual Basic. Page 424.

Public Class Form1
Private Sub btnCalc_Click(sender As Object, e As EventArgs) HandlesbtnCalc.Click
Dim Oil As Decimal
Dim Lube As Decimal
Dim RadFlush As Decimal
Dim TransFlush As Decimal
Dim Inspection As Decimal
Dim Muffler As Decimal
Dim Tire As Decimal
Dim Parts As Decimal
Dim Labor As Decimal
Dim totSrvcLabor As Decimal = CStr(totSrvcLabor)
Dim totParts As Decimal = CStr(totParts)
Dim totTax As Decimal = CStr(totTax)
Dim GrandTotal As Decimal = CStr(GrandTotal)

' Get the Parts Cost and Labor time in minutes.
Try
Parts = CStr(txtParts.Text)
Labor = CStr(txtLabor.Text)
End Try

Function ValidateInputFields(Parts, Labor) As Boolean

If Not Decimal.TryParse(txtParts.Text, Parts) Then
lblMessage.Text = "Parts input must be numeric"
Return False
End If

If Not Decimal.TryParse(txtLabor.Text, Labor) Then
lblMessage.Text = "Labor input must be numeric"
Return False
End If

' Verify that the two input values are valid numbers and neitheris less than zero.

' Calculate all oil and lube charges.
If chkOil.Checked Then
Oil = 36D
End If
If chkLube.Checked Then
Lube = 28D
End If
Function CalcOilLubeCharges(ByVal Oil, ByVal Lube) As Decimal
End Function

' Calculate radiator and transmission flush charges.
If chkRadFlush.Checked Then
RadFlush = 50D
End If
If chkTransFlush.Checked Then
TransFlush = 120D
End If

Function CalcFlushCharges(ByVal RadFlush, ByVal TransFlush) AsDecimal
End Function

' Calculate inspection, muffler, and tire rotation charges
If chkInspection.Checked Then
Inspection = 15D
End If
If chkMuffler.Checked Then
Muffler = 200D
End If
If chkTire.Checked Then
Tire = 20D
End If
Function CalcMisCharges(ByVal Inspection, ByVal Muffler, ByValTire) As Decimal
End Function
' Calculate and display the total of all charges including Laborand Services.
Function CalcSrvcLabor(ByVal CalcOilLubeCharges, BValCalcFlushCharges, ByVal CalcMiscCharges, ByVal Labor) AsDecimal

End Function
' Calculate and display the total of Parts.
totParts = Parts
' Calculate and display the Total Tax on Parts.
totTax = .06 * Parts
' Calculate the Grand Total.
Sub CalculateTotalCharges(CalcSrvcLabor, totParts, totTax)

End Sub
Private Sub btnClear_Click(sender As Object, e As EventArgs)Handles btnClear.Click
' Reset the oil change and lube job check boxes.
chkOil.Checked = False
chkLube.Checked = False
' Clear the radiator and transmission flush check boxes.
chkRadFlush.Checked = False
chkTransFlush.Checked = False
' Clear the inspection, muffler replacement, and tire rotationcheck boxes.
chkInspection.Checked = False
chkMuffler.Checked = False
chkTire.Checked = False
' Clear the parts and labor text boxes.
txtLabor.Clear()
txtParts.Clear()
' Clear the Services and Labor Totals, Parts Total, Tax, and TotalFees.
txtTotal.Text = String.Empty
txtTax.Text = String.Empty
txtPartsTotal.Text = String.Empty
txtSrvcLabor.Text = String.Empty
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) HandlesbtnExit.Click
' Exit the form.
Me.Close()
End Sub
End Class

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Multimedia tools and applications
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education