package com.imsl.test.example.finance; import com.imsl.finance.*; import java.text.NumberFormat; /** *
* Computes the straight line depreciation of an asset.
* The straight line depreciation for one period of an asset with a life of 24 * months, an initial cost of $2500 and a salvage value of $500 is computed. * * * * @see Code * @see Output */ public class FinanceSlnEx1 { public static void main(String args[]) { double cost = 2500; double salvage = 500; int life = 24; double sln = Finance.sln(cost, salvage, life); System.out.println("The straight line depreciation of the " + "asset for one period is " + NumberFormat.getCurrencyInstance().format(sln)); } }