Consider the following code: public class Banker { private BankAccount[] accounts; public Banker(BankAccount[] theAccounts) { accounts = theAccounts; } public BankAccount[] updateOverDueAccounts() {...


Consider the following code:
public class Banker {
private BankAccount[] accounts;

public Banker(BankAccount[] theAccounts) {
accounts = theAccounts;
}

public BankAccount[] updateOverDueAccounts() {
try {
for (BankAccount anAccount : accounts) {
if (anAccount.getOverdueAmount() <= 250)="">
anAccount.setOverdueFlag();
}
}
}
catch (Exception ex) {
System.out.println ("Exception: " + ex.getMessage());
}
return accounts;
}
}


Calculate the following metrics (IMPORTANT: show how each value was calculated):
a- The Cyclomatic Complexity of the Banker constructor method
b- The Cyclomatic Complexity of the updateOverDueAccounts method
c- The WMPC (Weighted-methods-per-class) of the Banker class
d- The CBO (Coupling-between-objects) of the Banker class.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here