Design and develop a simple application system that computes the Depreciation Cost of Item (D) takes as input the purchase. Price of an Item (P) its expected number of year of service (S) and yearly Depreciation of the Item (Y)
Use the formula D=P-S/Y.
Note :
After the user enter the Purchase Price of an item (P) its expected number of year of Service (S) and yearly depreciation for the item (Y) at text boxes 1,2 and 3 the user should Click button (with a compute caption) before the resulting computed value will be displayed at the text box 4
Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim P As Double = Double.Parse(txtP.Text)
Dim S As Integer = Integer.Parse(txtS.Text)
Dim Y As Double = Double.Parse(txtY.Text)
Dim D As Double = P - S / Y
txtD.Text = D.ToString()
End Sub
End Class
Comments
Leave a comment