FileDocCategorySizeDatePackage
change.javaAPI DocExample393Wed Mar 07 16:22:28 GMT 2001None

Change

public class Change extends Applet

Fields Summary
private int
amountTendered
private int
itemCost
Constructors Summary
Methods Summary
public voidpaint(java.awt.Graphics g)

	
	   
	
		g.drawString("For an item costing " + itemCost + " pence", 20, 20);
		g.drawString( "The change required for the " + amountTendered
		 + " pence is " + (amountTendered - itemCost), 20, 40);