Strategy design pattern implementation
Error(s): [TRACE] LinearCombStrategy => I was cloned
[TRACE] LinearCombStrategy => I was cloned
==== Strategy = add ====
strategy = add ( x = 3 ; y = 4 )
Result = 7
==== Strategy = mul ====
strategy = mul ( x = 3 ; y = 4 )
Result = 7
==== Strategy = Linear combination ====
strategy = Linear combination a * x + b * y + c ( x = 3 ; y = 4 )
Result = 31
==== Strategy = Linear combination [2] ====
strategy = Linear combination a * x + b * y + c ( x = 5 ; y = 3 )
Result = 55
==== Strategy = Linear combination [2] ====
strategy = Linear combination a * x + b * y + c ( x = 2 ; y = 6 )
Result = 52
|
|