class InputSumExample {

  public <ResourcePoolT extends ResourcePool> void runApplication(
      SecureComputationEngine<ResourcePoolT, ProtocolBuilderNumeric> sce,
      ResourcePoolT resourcePool, Network network) {
    InputApplication inputApp;

    int myId = resourcePool.getMyId();
    int[] inputs = new int[]{1, 2, 3, 7, 8, 12, 15, 17};
    if (myId == 1) {
      // I input
      inputApp = new InputApplication(inputs);
    } else {
      // I do not input
      inputApp = new InputApplication(inputs.length);
    }
    SumAndOutputApplication app = new SumAndOutputApplication(inputApp);

    BigInteger result = sce.runApplication(app, resourcePool, network);
    int sum = 0;
    for (int i : inputs) {
      sum += i;
    }
    System.out.println("Expected result: " + sum + ", Result was: " + result);
  }

  public  InputSumExample();

}