lmao, the only person who even thinks about polymorphism ont hese forums is caleb, who else could it be...

lmao, the only person who even thinks about polymorphism ont hese forums is caleb, who else could it be...
How could this hapen to meeeeeeeeeeeeeee?lol.
Actually, the person who taught me about polymorphism is Tomm.
Stuff polymorphism, looks too complicated :'\ But do they use it in Habbo? For the pets?
HTML Code:class Animal: def __init__(self, name): # Constructor of the class self.name = name class Cat(Animal): def talk(self): return 'Meow!' class Dog(Animal): def talk(self): return 'Woof! Woof!' a = Cat('Missy') b = Cat('Mr. Bojangles') c = Dog('Lassie') for animal in (a, b, c): print animal.name + ': ' + animal.talk() # prints the following: # # Missy: Meow! # Mr. Bojangles: Meow! # Lassie: Woof! Woof!
PHP Code:<?php
require_once ('en/classes/core.php');
class demonstration extends core {
/**
*
*/
public function __construct() {
parent::__construct ();
//TODO - Construct
}
/**
*
*/
function __destruct() {
//TODO - Destruct
}
}
?>
And that is..?![]()
Just a normal PHP class, that extends the class core.
I tried using OOP for a PM system for my backend, it failed unsuprisingly, shame really, I don't really know wheer to start with learning real OOP.
How could this hapen to meeeeeeeeeeeeeee?lol.
You first need to learn the "theory" of it, how it works, and how it can be used in your application.
OOP is not just a thing.. it is a whole practice and technique.
Where do I start on learning the thoery?
How could this hapen to meeeeeeeeeeeeeee?lol.
Want to hide these adverts? Register an account for free!