create a class "addamount" with an data member named "amount" with an initial value of $50 . now make two constructor of this class--
1. without any parameter--no amount will be added to the piggie bank.
2. having a parameter which is the amount will be added to piggie bank.
then , create object of addamount class and display final amount in piggie bank...
*/
Comments
Post a Comment