
class Mar25 {
	public static void main(String[] args) {

		Player joe = new Player("joe");

		String name = joe.getName();
		System.out.println(name);
		
		System.out.println(joe.toString());

		/* an instance of the Player class is
			an instance of the Object class */

		boolean joeIsObject = (joe instanceof Object);
		System.out.println("joe is an Object: " + joeIsObject);

		boolean joeIsPlayer = (joe instanceof Player);
		System.out.println("joe is a Player : " + joeIsPlayer);

		Player sue = new Player("sue");
		sue.setLevel(5);
		
		boolean areEqual = sue.equals(joe);
		System.out.println("are equal: " + areEqual);
	
		boolean hasSameLevel = sue.hasSameLevel(joe);
		System.out.println("has same level: " + hasSameLevel);
	}
}
