Depreciation For tax purposes an item may be depreciated over a period of severa
ID: 3692767 • Letter: D
Question
Depreciation For tax purposes an item may be depreciated over a period of several years, n. With the straight-line method of depriciation,each year the item depreciates by (I/n)ch of its orginal value. With the double-declining-balance method of depreciation. each year the item depreciates by (2/n)this of its value at the beginning at that year (In the final year it is depreciated by its value at the beginning to the year.) Write a program that performs the following tasks: (a) Request a description ot the item, the year of purchase, the cost of the item, the number of years to be depreciated (estimated life), and the method of depreciation. The methed of depreciation. The method of depreciation should be chosen by clicking on one ot two buttons (b) Display*. a year-for-rear description of the depreciation. See Fig- 6-67.Explanation / Answer
Dim yearpurchased, cost, life, depreciation, begvalue, total As Double
Dim item As String
Dim fmt As String = "{0,-7}{1,10}{2,16}{3,20}"
Dim numberyears As Integer
item = txtItem.Text
yearpurchased = txtYear.Text
cost = txtCost.Text
life = txtLife.Text
listDepreciation.Items.Clear()
listDepreciation.Items.Add("Descriptio… " & item)
listDepreciation.Items.Add("Year of purchase: " & yearpurchased)
listDepreciation.Items.Add("Cost: " & FormatCurrency(cost))
listDepreciation.Items.Add("Estimated life: " & life)
listDepreciation.Items.Add("Method of depreciation: straight-line")
listDepreciation.Items.Add(" ")
listDepreciation.Items.Add(String.Form… "", "Value at", "Amount Deprec", "Total Depreciation"))
listDepreciation.Items.Add(String.Form… "Year", "Beg of Yr", "During Year", "to End of Year"))
depreciation = (2 * cost) / life
begvalue = cost
// depreciation = begvalue * DepreciationRate
For numberyears = 1 To life
total += depreciation
listDepreciation.Items.Add(String.Format(fmt, _
yearpurchased, _
FormatNumber(begvalue), _
FormatNumber(depreciation), _
FormatNumber(total)))
begvalue = begvalue - depreciation
depreciation = begvalue * DepreciationRate
If numberyears = life - 1 Then
depreciation = begvalue
End If
yearpurchased = yearpurchased + 1
Next
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.