## Details

**BMIS 208 Programming Assignment 5 Depreciation using Sum of the Years Digits Method**

**Instructions:**

Depreciation is the systematic and rational allocation of cost over a period of time.

The study of accounting teaches us that several different methods are used to allocate the cost of an asset over time. Some methods are based upon the amount of time that an asset is expected to be useful (e.g. straight line, double-declining balance, sum-of-the-years digits methods), while others are based upon the amount of activity an asset incurs over its useful life (i.e. units of production method). In this assignment, you will write a Visual Basic program that calculates depreciation of an asset using the sum-of-the-years digits method. Your program should perform the following tasks:

**Deliverables:**

a. Request a description of the item, the year of the purchase, the cost of the item, the salvage value of the item, and the number of years to be depreciated (estimated life) using textboxes.

b. A single button should appear on the form that, when clicked, calculates the results of the depreciation and displays the results in a listbox as shown below.

c. Using the formula below, calculate the amount of depreciation per year given the values entered by the user. You may assume a January 1 date of purchase for the year entered. Display a year-by-year description of the depreciation. See the diagram below.

**Sum-of-the-years digits formula:**

Step 1: Calculate the sum of the year's digits: Add up the number of years that the asset will be in use. (i.e. if an asset has a useful life of 5 years, add the numbers 5+4+3+2+1 = 15.) This is your denominator in the formula.

Step 2: Express each year as a ratio of the year number divided by the result calculated in Step 1. (Round to the nearest whole number.)

Example:

Asset cost: 10,000

Salvage value: 2,000

Useful life: 5 years

Denominator: 15

Year 1 multiplier: 5/15

Year 2 multiplier: 4/15

Year 3 multiplier: 3/15

Year 4 multiplier: 2/15

Year 5 multiplier: 1/15

Step 3: Multiply the cost of the asset (less its salvage value) by each year's multiplier to compute each year's depreciation.

Example:

Depreciation Carrying amount of asset Total depreciation to-date

At End of Year (Accumulated Depreciation)

(Book Value)

Year 1: 5/15 * (10,000 - 2,000) = $2,667 10,000 - 2,667 = 7,333 2,667

Year 2: 4/15 * (10,000 - 2,000) = $2,133 7,333 - 2,133 = 5,200 2,667 + 2,133 = 4,800

Year 3: 3/15 * (10,000 - 2,000) = $1,600 5,200 - 1,600 = 3,600 4,800 + 1,600 = 6,400

Year 4: 2/15 * (10,000 - 2,000) = $1, 067 3,600 - 1,067 = 2,533 6,400 + 1,067 = 7,467

Year 5: 1/15 * (10,000 - 2,000) = $ 533 2,533 - 533 = 2,000 7,467 + 533 = 8,000

(2,000 is the salvage value.

So, this is correct.)

Adding all of the years of depreciation yields $8,000 (2,667 + ,133 + 1,600 + 1,067 + 533), which is equal to the cost - salvage value of the asset.

[Note that you cannot depreciate an asset below its salvage value.]

d. Note that in your output, you must indicate the remaining balance of the item at the beginning of the year, followed by the amount of depreciation to be taken during the year, followed by the total amount of accumulated depreciation on the asset since its purchase, and finally followed by the net book value (original value of the asset being depreciated less the total depreciation taken to-date) at the end of the year.

e. Make sure you use good software design principles, such as clearing the listbox after a user clicks a button but before new results are displayed. Make sure you also check for valid inputs (i.e. no textboxes left blank, no negative numbers, no alphabetic characters where numbers are expected, etc.)