Ok im trying to put the pieces together. If anyone can lend any sort of help it would be much appreciated. what i have so far is. Ive got 5 different class and im not sure how to join them?

I need to be able to get an employee from the array.
Check whether or not they are self-employed (using a Boolean).
Then apply the appropriate calculation to work out the tax on their pay.
And then display the answer.

public class Government extends Employee {

	public Government(String name, int pay, boolean selfemployed){
	boolean selfemployed = true;
	public static void main (String [] args)
		Employee[] staff = new Employee[4];
		staff[0] = new Employee("person1",15000, true);
		staff[1] = new Employee("person2",20000, false);
		staff[2] = new Employee("person3",25000, true);
		staff[3] = new Employee("person4",30000, false);


public class CalculateTax{
	public static void main (String [] args){
	double standardTax;
	double selfEmployedTax;
	double pay;
	double netPay;
	standardTax = ((pay * 0.2)*0.15) + ((pay * 0.6)* 0.3);
	selfEmployedTax = ((pay * 0.6)*0.2);


public class Employee{
	public Employee (String name,int pay, boolean tax){
		//calculateTAx method

public class SelfEmployedEmployee extends Employee{

	// override CalculateTAx

public class StandardEmployee extends Employee{

	//override calculateTax

Last edited by shabbir; 17Sep2008 at 22:38.. Reason: Code block