You are on page 1of 4

Ex.

Test case 1: f_match_characters(“string”, “strong”) -> “strng”


Test case 2: f_match_characters(“string”, “strong”, “strength”) -> “strng”

Test case 3: f_match_characters(“string”,"", “strength”) -> null

Test case 4: f_match_characters(“s”, “a" ) -> null

Test case 5: f_match_characters(“s”, “7”,“t”) -> IllegalArgumentException

Test case 5: f_match_characters(“!”, “?”,“+”) -> IllegalArgumentException

Ex.1

f(0) – IllegalArgumentException
f(1) – it is not specify in requirements
f(3) – Foo
f(5) – Bar
f(7) – Qix

2 digits multiplication:
f(15) – FooBarBar
f(21) – FooQix
f(35) – BarQixFooBar

3 digits multiplication:
f(105) – FooBarQixBar

Ex.2.2
f(105) – FooBarQix*Bar

Ex.3
Constraints:

Adults >=18

Clients >=60 >>>> fixedInterestRate=2

MinDeposit=100

MaxDeposit=9999

If Deposit > 9999 then

Get phoneNumber

Given

Adult

Test Case1

Input: deposit = 99
Output = null
Reason: deposit < 100

Test Case2
If age = 17 then thrown Exception

Boundary test cases:

DepositAmount=99 then AnnualInterestRate=0 or not applicable

AnnualInterestAmount=0 or not applicable, FinancialStatementAtTheEndOfYear=0 or not


applicable

DepositAmount=100 then AnnualInterestRate=1%


AnnualInterestAmount=1 , FinancialStatementAtTheEndOfYear=101

DepositAmount=101 then AnnualInterestRate=1%

AnnualInterestAmount=1.01 , FinancialStatementAtTheEndOfYear=102.01

DepositAmount=998 then AnnualInterestRate=1%

AnnualInterestAmount=9.98 , FinancialStatementAtTheEndOfYear=1008.98

DepositAmount=999 then AnnualInterestRate=1%

AnnualInterestAmount=9.99 , FinancialStatementAtTheEndOfYear=1008.99

DepositAmount=1000 then AnnualInterestRate=1.3%

AnnualInterestAmount=13 , FinancialStatementAtTheEndOfYear=1013

DepositAmount=4998 then AnnualInterestRate=1.3%

AnnualInterestAmount=64.974 , FinancialStatementAtTheEndOfYear=5062.974

DepositAmount=4999 then AnnualInterestRate=1.3%

AnnualInterestAmount=64.987 , FinancialStatementAtTheEndOfYear=5063.987

DepositAmount=5000 then AnnualInterestRate=1.5%

AnnualInterestAmount=75 , FinancialStatementAtTheEndOfYear=5075

DepositAmount=5001 then AnnualInterestRate=1.5%

AnnualInterestAmount=75.015 , FinancialStatementAtTheEndOfYear=5076.015
DepositAmount=9998 then AnnualInterestRate=1.5%

AnnualInterestAmount=149.97 , FinancialStatementAtTheEndOfYear=10147.97

DepositAmount=9999 then AnnualInterestRate=1.5%

AnnualInterestAmount=149.985 , FinancialStatementAtTheEndOfYear=10148.99

DepositAmount=10000 then AnnualInterestRate=1.5% (from 9999)

AnnualInterestAmount=149.985 , FinancialStatementAtTheEndOfYear=10148.99

Remainer =1

You might also like