FileDocCategorySizeDatePackage
Main.javaAPI DocExample412Sat Apr 28 10:22:46 BST 2001None

Main

public class Main extends Object
Part of a main program using Shape objects

Fields Summary
Collection
allShapes
Constructors Summary
Methods Summary
public doubletotalAreas()
Iterate over all the Shapes, getting their areas

		Iterator it = allShapes.iterator();
		double total = 0.0;
		while (it.hasNext()) {
			Shape s = (Shape)it.next();
			total += s.computeArea();
		}
		return total;