Timeline for Simple OOP currency converter
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 3, 2019 at 14:50 | comment | added | wallenborn | 4. My point is that rates change over time, so you don't want them to be constant, but clients should not be allowed to change them, so you want them to be immutable. Think about how to solve this. | |
| Jul 3, 2019 at 12:19 | comment | added | Nguyen | Hi, I re-implement my code and created follow-up question here. Can you take a look ? codereview.stackexchange.com/questions/223411/… | |
| Jul 3, 2019 at 0:17 | comment | added | Nguyen | Thank you for anwering me. Let me answer your question: 1. I will change Bank class to ExchangeRate. I will create a dictionary rate = {"GBPUSD": 2, "USDGBP: 0.5} 2. So you mean I should create a dictionary for rate ? So I don't have to call another ExchangeRate everytime ? 3. I think I should add method: changeRate 4. I should raise exception as soon as addRate was called 2nd time for same pair currency and add new method: changeRate() which can be called multiple time 5. I don't quite understand the point. I think I should create a class for storing currency amounts | |
| Jul 2, 2019 at 16:29 | history | answered | wallenborn | CC BY-SA 4.0 |