A. Create aDollarcurrency class withtwointegerattributes andone stringattribute, all of which are non-public. Theintattributes will represent whole part (or currency note value) and fractional part (or currency coin value) such that 100 fractional parts equals 1 whole part. Thestringattribute will represent the currency name.
B. Create aCIS22C Dollarderived/inherited class withoneadditional non-publicdoubleattribute to represent the conversion factor from/to US Dollar.
C. In your two currency classes, add public methods for the following:
D. Create aWalletclass with one attribute - an array of twoDollarreferences / pointers and the following methods to demonstrate polymorphism of the currencies:
E. In your main:
Things to remember:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here