SavingsAccountDetails savings = savingsAccountService.getAccountDetails(customerID);
System.out.println("Savings account: " + savings);
summaries.add(savings.toString());
StockAccountDetails stock = stockAccountService.getAccountDetails(customerID);
System.out.println("Stock account: " + stock);
summaries.add(stock.toString());
// Get the stock price in USD
double price = stockQuoteService.getQuote(stock.getSymbol());
System.out.println("Stock price for " + stock.getSymbol() + ": " + price);
// Convert to the configured currency
if (currency.equals("EURO")) {
// Use our fancy calculator service to convert to the target currency
price = calculatorService.multiply(price, 0.70);
System.out.println("Converted to " + currency + ": " + price);
}
// Calculate the value of the stock account
double stockValue = price * stock.getQuantity();
summaries.add(stock.toString());
AccountReport report = new AccountReport(currency, summaries);
return report;
} catch ( Throwable e ) {