Question: public static void setBasicAccountData ( BankAccount account ) { account.setAccountID ( getAccountIDFromUser ( ) ) ; account.setInterestRate ( getInterestRateFromUser ( ) ) ; } public
public static void setBasicAccountDataBankAccount account
account.setAccountIDgetAccountIDFromUser;
account.setInterestRategetInterestRateFromUser;
public static void addAccount
displayAccountTypeMenu;
int choice getMenuChoiceFromUser;
handleAccountTypeMenuChoicechoice;
public static void addSavingsAccount
SavingsAccount newSavings new SavingsAccount;
setBasicAccountDatanewSavings;
accounts.addnewSavings;
public static void addCheckingAccount
CheckingAccount newChecking new CheckingAccount;
setBasicAccountDatanewChecking;
newChecking.setFeegetOverdraftFeeFromUser;
accounts.addnewChecking;
public static void addCreditcardAccount
CreditcardAccount newCredit new CreditcardAccount;
setBasicAccountDatanewCredit;
newCredit.setLimitgetCreditLimitFromUser;
accounts.addnewCredit;
public static void makeCredit
String accountId getAccountIDFromUser;
int creditAmount getAmountFromUser;
for BankAccount curAccount : accounts
if accountIdequalscurAccountgetAccountID
curAccount.creditcreditAmount;
return;
System.out.println Credit failed Invalid account number! ;
public static void makeDebit
String accountId getAccountIDFromUser;
int debitAmount getAmountFromUser;
for BankAccount curAccount : accounts
if accountIdequalscurAccountgetAccountID
if curAccount.debitdebitAmount
System.out.println Debit failed Insufficient funds or credit! ;
return;
System.out.println Debit failed Invalid account number! ;
public static void transferFunds
String srcAccountId getAccountIDFromUser;
String destAccountId getAccountIDFromUser;
int transferAmount getAmountFromUser;
BankAccount srcAccount null;
BankAccount destAccount null;
for BankAccount curAccount : accounts
if srcAccountIdequalscurAccountgetAccountID
srcAccount curAccount;
if destAccountIdequalscurAccountgetAccountID
destAccount curAccount;
if srcAccount null destAccount null
System.out.println Transfer failed Invalid account number! ;
return;
if srcAccountdebittransferAmount
destAccount.credittransferAmount;
else
System.out.println Transfer failed Insufficient funds! ;
public static void viewAccountDetails
String accountId getAccountIDFromUser;
BankAccount account findAccountByIdaccountId;
if account null
System.out.printlnaccountaccountInfo;
else
System.out.println Operation failed Invalid account number! ;
public static void applyMonthlyInterest
for BankAccount account : accounts
account.applyInterest;
public static BankAccount findAccountByIdString accountId
for BankAccount curAccount : accounts
if accountIdequalscurAccountgetAccountID
return curAccount;
return null;
: Structure Test
Main class should have required method named setBasicAccountData
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named addAccount
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named addSavingsAccount
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named addCheckingAccount
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named addCreditcardAccount
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named makeCredit
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named makeDebit
Feedback
FAIL correct method NOT found
Review the assignment instructions regarding required methods.
: Structure Test
Main class should have required method named transferFunds
Feedback
FAIL correct method NOT found
Review the assignment instructio
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
