class CompetitiveExams{
public void printResult(){
System.out.println("The Result has been published");
}
}
class UPSC extends CompetitiveExams{
public void printResult(){
System.out.println("Sorry, You couldn't crack UPSC");
}
}
class SSC extends CompetitiveExams{
public void printResult(){
System.out.println("Congratulation You have qualified for final round ");
}
}
class HPSC extends CompetitiveExams{
public void printResult(){
System.out.println("You have cleared Tier 1");
}
}
class HSSC extends CompetitiveExams{
public void printResult(){
System.out.println("You have been selected for group C post");
}
}
class TestPolymorphism{
public static void main(String args[]){
CompetitiveExams Result1 = new UPSC();
CompetitiveExams Result2 = new SSC();
CompetitiveExams Result3 = new HPSC();
CompetitiveExams Result4 = new HSSC();
Result1.printResult();
Result2.printResult();
Result3.printResult();
Result4.printResult();
}
}