// Base class for Employee public class Person { private String name; private char gender; private int age; public Person(String theName, char theGender, int theAge) { name = theName; gender = theGender; age = theAge; } public String getName( ) { return name; } public char getGender( ) { return gender; } public int getAge( ) { return age; } public String toString( ) { return String.format("%s %c %d", name, gender, age); } public static void main(String[ ] args) { Person p = new Person("Alice", 'F', 23); System.out.println("Name of p is " + p.getName( )); System.out.println("Gender of p is " + p.getGender( )); System.out.println("Age of p is " + p.getAge( )); System.out.println("Output of toString for p: "); System.out.println(p); } }