Skip to content

VUS Design Assumptions

illyfrancis edited this page Jul 31, 2013 · 8 revisions

UAF

Dual Account Service

enum DualAccountType {
  TYPE_A, TYPE_B, TYPE_C;
}

interface DualAccountService {
  DualAccountType determineType(int accountNumber); // - Q1

  // precondition is the accountNumber arg is account type B or C
  int getAccountNumberTypeA(int accountNumber); // - Q2

  // precondition is the accountNumber input arg is account type A
  int getAccountNumberTypeB(int accountNumber);  // - Q2

  // precondition is the accountNumber input arg is account type A
  int getAccountNumberTypeC(int accountNumber);  // - Q2
}

Q1: What if the type cannot be determined for the given account number? Exception or null.

Q2: Can UAF return invalid account number? Exception or zero.

Clone this wiki locally