- Design the object model for a currency conversion library. Assume you're working for a bank which allows its clients to deposit money into their USD account. Customers have cash in different currencies and want to know the amount in USD which will be added to their account. You want to create a library for a widget which calculates the resulting amount in USD.
UI looks like this:
[Currency name] [Amount]
[Currency name] [Amount]
[+]
…
[Resulting amount in USD]
The actual rates are available as JSON array [{"code": "EUR", "name": "Euro", "rate": 1.2345}, …]
- Add discounted rates for amounts over $333.33 (111.12 + 222.21)
- Some users are VIP, we want to add a 1% bonus to the resulting amount
- Add a backup source URL in case the request is taking longer than 1 second