double getResult() { 
		
		//trim redundant spaces
		String nums = getNumbers().trim();
		
		//split <Numbers> string in tokens
		StringTokenizer st = new StringTokenizer(nums, " ");
		
		//add tokens to List
		ArrayList<Double> al = new ArrayList<Double>();
		
		while(st.hasMoreTokens())
			try {
				al.add(Double.parseDouble(st.nextToken()));
			}catch(NumberFormatException nfe) {
				System.out.println("\nInvalid number format in <Numbers>.");
			}
		
		// Determine type of operation and compute
		
		if(getName().equalsIgnoreCase("sum")) {
			double sum = 0;
			for(int i = 0; i < al.size(); i++) {
				sum += al.get(i);
			}
			result = sum;
		}
		else if(getName().equalsIgnoreCase("avg")) {
			double sum = 0;
			double avg;
			for(int i = 0; i < al.size(); i++) {
				sum += al.get(i);
			}
			avg = sum / al.size();
			result = avg;
		}
		else if(getName().equalsIgnoreCase("min")) {
			double min = Collections.min(al);
			result = min;
		}
		return result;
	}