package com.imsl.test.example.finance; import com.imsl.finance.*; import java.text.NumberFormat; /** *
* Computes the depreciation of an asset using the variable-declining balance * method.
* * The depreciation between the 10th and 15th year of an asset with a life of 15 * years, an initial cost of $25000 and a salvage value of $5000 is computed. * The variable-declining balance method is used. * * @see Code * @see Output */ public class FinanceVdbEx1 { public static void main(String args[]) { double cost = 25000; double salvage = 5000; int life = 15; int start = 10; int end = 15; double factor = 2.; boolean no_sl = false; double vdb = Finance.vdb(cost, salvage, life, start, end, factor, no_sl); System.out.println("The depreciation allowance between the " + "10th and 15th year is " + NumberFormat.getCurrencyInstance().format(vdb)); } }