Package Strategy

Examples of Strategy.OperationMultiply


    System.out.println(num1 + " + " + num2 + " = " + ctx.executeStrategy(num1, num2));
   
    ctx = new Context(new OperationSubtract());
    System.out.println(num1 + " - " + num2 + " = " + ctx.executeStrategy(num1, num2));
   
    ctx = new Context(new OperationMultiply());
    System.out.println(num1 + " * " + num2 + " = " + ctx.executeStrategy(num1, num2));
   
 
View Full Code Here

TOP

Related Classes of Strategy.OperationMultiply

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.