Answer to Question #253068 in Visual Basic for Sad

Question #253068

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 


1
Expert's answer
2021-10-19T15:20:14-0400
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





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS