Sunday, 5 May 2013

Abstract Class Example


abstract class One{

public function disp(){

echo "Inside the parent class
";

}

}

class Two extends One{

public function disp(){

echo "Inside the child class
";

}

}

class Three extends One{

//no method is declared

}

$two=new Two();

echo "Calling from the child class Two:
";

$two->disp();

echo "Calling from the child class Three:
";

$three=new Three();

$three->disp();

?>

1 comment:

  1. I really glad to this blog for providing the programming language of Abstract Class with example.
    Web Design Company | Web Design Companies

    ReplyDelete