there is no particular logic in a pure exchange. The exchange is based
on a rate that is established by a competent authority for your
country. In EU at ex. that is ECB, which offers daily this data as an
xml file.
If you check up this document, you will see that this rates refers to
EUR as currency, <Cube rate="1.4357" currency="USD"/>, it means that
for 1 € you will get 1.4357 $, and so on.
If we create a proper class that will manage all exchange operations,
and "feed her" with data from different sources (based on provider
model), anyone if needed can implement a provider for gathering this
data from the source that he needs to use and still preserve all app
logic and use all the features of the exchange class.
This weekend I will have some spare time and I will get a deeper look
on your work and try to write down a couple of ideas.
Regards,
Mario Majcica