Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Tier
- {
- public Name;
- public Fellfarbe;
- public KrallenLaenge;
- public AnzahlBeine;
- public gibNamenAus()
- {
- echo "Ich heiΓe ".$this->name."\n";
- }
- }
- class Hund extends Tier
- {
- public GefangeneKatzen;
- public function gibLaut()
- {
- echo "Wau\n";
- }
- }
- class Katze extends Tier {
- public GefangeneVoegel;
- public function gibLaut()
- {
- echo "Miau\n";
- }
- }
- class Amsel extends Tier
- {
- public GefangeneInsekten;
- public function gibLaut()
- {
- echo "Piep";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement