/* * Loan.java * * Created on 17 August 2007 * * All loan types (house loan, car loan etc) must implement this class and a payment class * * If loan types need different functionality, this can be used as an interface to * those types. If not, we don't really need this interface. */ package loan; /** * * @author merethe */ public interface Loan{ int money = 0; //Amount of money int years = 0; //Number of years String payment = ""; /** * Set money * @param money Amount of money */ public void set_money(int money); /** * Set years * @param years Number of years */ public void set_years(int years); /** * Calculate and return the payment * @return A string with the calculated results, ready to be displayed */ public String calculate(); }