Codes PDF
Codes PDF
Create class Account in com package with attributes as below. Constructor takes parameters in same
sequence as per the image. Create getters and setters.
Create class AccountDemo in com package with main method and other two static methods as below.
Method “depositInterest” will take one Account object and double value. The double value represents
interest percentage out of 100. Method will update balance of the object passed increasing as per
mentioned percentage and return the updated balance value.
Method getAccountsForSpecificCustomer will take array of Account objects and customer id. It will
return array of accounts with specified customer id in descending order of account id.
Please ensure that class names, attribute names, method signature etc. is same as above. Else your code
will fail and score would be zero.
Refer below sample main method and test the output. You can copy the same code in main method and
test the implementation.
Next submit the code in iASCERT for evaluation. Also, upload the code in iON assignment activity.
for(Account a : acc)
{
System.out.println(a.getAccountId());
}
Output:
11000.0
11000.0
4
2