package org.bench4q.master.unitTest;

public class PolymorphismTest {
	public void shout() {
		shoutTwice();
	}

	public void shoutTwice() {
		System.out.println("aaaaaa");
		System.out.println("aaaaaa");
	}

	public static void main(String[] args) {
		PolymorphismTest poly = new ChildTest();
		System.out.println("poly shout is ");
		poly.shout();

		ChildTest childTest = new ChildTest();
		System.out.println("child shout is ");
		childTest.shout();
	}
}

class ChildTest extends PolymorphismTest {
	public void shoutTwice() {
		System.out.println("bbbbbbb");
		System.out.println("bbbbbbb");
	}
}