Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

AccountDriver.java

//Copy constructor

public SavingsAccount(SavingsAccount oldAccount, double amount)
{           
    super(oldAccount,amount);  //  <--- SUPER COPY CONSTRUCTOR CALLED
    savingsNumber++;
    accountNumber = oldAccount.accountNumber + Integer.toString(savingsNumber);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+6 =