public class TestWork {
	public static void main( String[] args )
	{
		StaffMember[] workers = new StaffMember[5];
		workers[0] = new Volunteer( "Valerie" );
		workers[1] = new Volunteer( "Vlad" );
		workers[2] = new Executive( "Emma ");
		workers[3] = new Hourly( "Henry");
		workers[4] = new Hourly( "Hanna");
		
		for( int i=0; i<workers.length; i++ )
			System.out.println( workers[i].getName() );
	}
}

// note that this is normally in a separate file, and it would be declared public
class StaffMember
{
	String name;
	StaffMember( String n ) { name = n; }
	public String getName() { return name; }
}

// note that this is normally in a separate file, and it would be declared public
class Volunteer extends StaffMember
{
	Volunteer( String n ) { super(n); }
	public String getName() { return name; }
}

// note that this is normally in a separate file, and it would be declared public
class Employee extends StaffMember
{
	Employee( String n ) { super(n); }
	public String getName() { return name; }
}

// note that this is normally in a separate file, and it would be declared public
class Executive extends Employee
{
	Executive( String n ) { super(n); }
	public String getName() { return name; }
}

// note that this is normally in a separate file, and it would be declared public
class Hourly extends Employee
{
	Hourly( String n ) { super(n); }
	public String getName() { return name; }
}

