Search found 3 matches

by jackaboo
Wed Dec 16, 2009 2:16 pm
Forum: PHP - Code
Topic: Inheritance and Polymorphism
Replies: 6
Views: 185

Re: Inheritance and Polymorphism

ok I'm stuck at the end.... In the driver program create and array that consists of an instance of a cat and an instance of a dog. Use a for loop to get each element in the array and call its speak method. <?php abstract class Pet{ private $name; function __construct($name) { $this->name =$name; } p...
by jackaboo
Tue Dec 15, 2009 1:12 pm
Forum: PHP - Code
Topic: Inheritance and Polymorphism
Replies: 6
Views: 185

Re: Inheritance and Polymorphism

Of course! I'll attribute all of the help I had in completing this assignment to this fantastic group. I always attribute where I finally got the answers from.
by jackaboo
Tue Dec 15, 2009 10:57 am
Forum: PHP - Code
Topic: Inheritance and Polymorphism
Replies: 6
Views: 185

Inheritance and Polymorphism

Can anyone help me with this assignment, I want to get the right answer then work through it to undestand. thanks! create an abstract base class called Pet. This class will have one attribute called name. Then I want to Create set and get methods for name and Create an abstract method called speak. ...