FileDocCategorySizeDatePackage
SalaryDetails.javaAPI DocExample842Thu Sep 14 15:34:10 BST 2000None

SalaryDetails.java

import java.awt.*;		// make graphics libraries available
import java.applet.*;	// make applet libraries available

public class SalaryDetails extends Applet  // make a new applet
{
	private double grossWage;		// declare real number variable to hold gross wage
											// variable for netWage
											// variable for taxDue
	
	public void paint(Graphics g)
	{
		grossWage  =  350.55;		// assign the variable grossWage the value 350.55
											// concatenate the value held in the variable
											// grossWage with the string and print 
											// the result
		g.drawString("The gross wage is " + grossWage, 20, 20);
			// now calculate the tax due, store the result in taxDue
			// now calculate the net pay, store the result in netWage
			// now print out the gross wage, the tax due and the net wage
	}
}