Thursday, November 2, 2017

HW18: Chapter 18

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

Currency Converter:

Operation: convertCeurrency
Inputs:  inputCurrencyType, outputCurrencyType, inputCurrencyAmount
Outputs: exchangeRate, inputCurrencyValue, outputCurrencyValue, fees
Exceptions: Invalid Currency Exception, Invalid Amount Exception

Operation: exchangeRate
Inputs:  inputCurrencyType, outputCurrencyType, inputCurrencyAmount
Outputs: exchangeRate, outputCurrencyAmount
Exceptions: Invalid Currency Exception, Invalid Amount Exception

Operation: currency
Inputs:  inputCurrencyAmount, outputCurrencyType
Outputs: outputCurrencyAmount
Exceptions: Invalid Currency Exception, Invalid Amount Exception


Check Credit:

Operation: creditCheck
Inputs:  ssn, name, birthdate
Outputs: creditScore
Exceptions: Invalid SSN Exception, Invalid Name Exception, Invalid Birthdate Exception

No comments:

Post a Comment