Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface iAnimal {
- public function breathe();
- public function die();
- public function birth($method, $gestation);
- }
- interface iMammal extends iAnimal {
- public function numOfLegs();
- public function colourOfHair();
- }
- class Dog implements iMammal {
- function __construct($numOfLegs, $colour) {
- }
- public function breathe() {
- //show how to breathe on land and frequency
- }
- public function die() {
- //kill dog
- }
- public function numOfLegs($numOfLegs = 4) {
- //return number of legs
- }
- public function colourOfHair() {
- //return colour of hair
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement