Let me give you an example on what I need help with:
Main class:
cnd:Currency
usd:Currency
cc:Combined_Currency
usd := cc.usd
cnd := cc.cnd
So, the class Combined_Currency
has a class Currency
. The Currency class has attributes for example exchange_rate
. I believe the Combined_Currency
class would have something like:
cnd:Currency
usd:Currency
My question is how do I implement the exchange_rate
part? I think exchange_rate is a constant, so I don't need to set anything to it.
I need it to check if: cad.exchange_rate = 1.5
In which class to I set the exchange_rate to it's corresponding currencies?
and could someone give me an idea what cad := cc.cad
means.