Package calculator.sci

Examples of calculator.sci.SciCalculatorService


            .append(calculatorService.multiply(3D, 2D)).toString());
        System.out.println("\nInvoking WebService Implementation ... ");
        System.out.println((new StringBuilder()).append("3 / 2 = ").append(calculatorService.divide(3D, 2D))
            .toString());
        System.out.println("\nInvoking Scientific Calculator Composite Implementation ... ");
        SciCalculatorService sciCalculator =
            (SciCalculatorService)context.locateService(SciCalculatorService.class, "sciCalculatorService");
        double values[] = {1.0D, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D};
        System.out.println("\tInvoking Java Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tAverage of 1,2,3,4,5,6,7,8,9 = ")
            .append(sciCalculator.average(values)).toString());
        System.out.println("\n\tInvoking JavaScript Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tSquare Root of 81 = ").append(sciCalculator
            .sqrt(81D)).toString());
        System.out.println("\tInvoking Java Implementation configured for Property  ... ");
        System.out.println((new StringBuilder()).append("\tSine 90 Degrees = ")
            .append(sciCalculator.sin(90D)).toString());
        System.out.println((new StringBuilder()).append("\tCos 90 Degrees = ").append(sciCalculator.cos(90D))
            .toString());
        System.out.println((new StringBuilder()).append("\tTan 90 Degrees = ").append(sciCalculator.tan(90D))
            .toString());
        System.out.println("\nExiting...");
    }
View Full Code Here

TOP

Related Classes of calculator.sci.SciCalculatorService

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.