Class Summer

java.lang.Object
  extended bySummer

public class Summer
extends Object

Summer adds the values in a after application of the function func

Version:
2003-10-15
Author:
CS1711

Constructor Summary
Summer(int aSize)
          Constructor for objects of class Summer
 
Method Summary
 int func(int i)
          applies a function to a[i]
 void readInput()
          this gets terminal input for new values in a
 void sumTester()
          tests the sumup and readInput methods
 int sumup()
          does the summing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Summer

public Summer(int aSize)
Constructor for objects of class Summer

Method Detail

func

public int func(int i)
applies a function to a[i]

Returns:
the function applied to a[i]

readInput

public void readInput()
this gets terminal input for new values in a


sumTester

public void sumTester()
tests the sumup and readInput methods


sumup

public int sumup()
does the summing

Returns:
the sum of a[i]