Objects

Hi guys, I need some help with the following program:

Objects of the Currency class require a name (string), a currency symbol (string) and the number of decimal places (integer) usually associated with the currency (in that order). Objects of the Money class require a Currency object (string), and the actual amount (integer) (in that order). Define an object of type Currency named canadianDollars and corresponding to the name "Canadian Dollar", the symbol "C$", and 2 decimal places. Define an Money reference variable valueInCanadians corresponding to 230 units of canadianDollars.

My code:

int value=230;
Money &valueInCanadians=(value); <----Not sure if this is right.

string name="Canadian Dollar";
string symbol="C$";
int deci=2;

Currency canadianDollars(name,symbol,deci);
I think you're supposed to define the classes then use them.
They just want the code not the classes.
Topic archived. No new replies allowed.