|
|
For tax purposes, an item may be depreciated over a period of several years, n. With the straight-line method of depreciation, each year the item depreciates by 1/nth of its original value. With the double-declining-balance method of depreciation, each year the item depreciates by 2/nths of its value at the beginning of the year. (In the last year, it is depreciated by its value at the beginning of the year). Write a program that performs the following tasks:
1. Requests a description of the item, the year of purchase, the cost of item, the number of years to be depreciated (estimated life), and the method of depreciation. Clicking one of two buttons should choose the method of depreciation.
2. Displays a depreciation schedule for the item similar to the schedule shown in Figure 1.
Figure 1:<<以下是一個table>>
Description: Computer
Year of purchase: 1999
Cost: $ 2,000.00
Estimated life: 5
Method of depreciation: double-declining-balance
Year Value at beginning Of year Amt depreciating
During Year Total Depreciation to End of Year
1999 2,000.00 800.00 800.00
2000 1,200.00 480.00 1,280.00
2001 720.00 288.00 1,568.00
2002 432.00 172.80 1,740.80
2003 259.00 259.00 2,000.00 |
|