package com.imsl.test.example.finance; import com.imsl.finance.*; import java.text.NumberFormat; /** *

* Computes sum-of-year's depreciation.

* * The sum-of-years' digits depreciation for the 14th year of an asset with a * life of 15 years, an initial cost of $25000 and a salvage value of $5000 is * computed. * * * @see Code * @see Output */ public class FinanceSydEx1 { public static void main(String args[]) { double cost = 25000; double salvage = 5000; int life = 15; int per = 14; double syd = Finance.syd(cost, salvage, life, per); System.out.println("The depreciation allowance for the 14th year is " + NumberFormat.getCurrencyInstance().format(syd)); } }