HW18: Chapter 18

18.4. Define an interface specification for the Currency Converter and Check credit rating services shown in Figure 18.7

public interface currencyConverter {
/**
* @param curCurrency the user’s currently held currency.
* @param echangeCurrency the user’s desired currency to be exchanged too
* @return returns the exchange rate based on the previous two parameters.
*/
public double getExchangeRate(String currentCurrency, String echangeCurrency);

/**
*
* @param Rate the exchange rate found by the getExchangeRate method.
* @param currencyAmount The current amount of currency the user wishes to exchange.
* @return the amount of currency available to the user after conversion.
*/
public double convertCurrency(Double Rate, Double currencyAmount);
}

public interface checkCredit {
/**
*
* @param userCreditInfo Object that stores the user’s credit information
* @return returns the users credit score.
*/
public int getCredit(Object userCreditInfo);
}

Leave a comment

Design a site like this with WordPress.com
Get started