Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Persona {
- private $trabajo = false;
- private $experiencia = 0;
- public function getTrabajo()
- {
- if($this->experiencia > 0)
- {
- $this->trabajo = true;
- echo "Haz conseguido un empleo. En Buenahora!"
- $this->experiencia++ ;
- } else {
- echo "Lo sentimos pero necesitamos a alguien con
- experiencia";
- $this->insultar();
- }
- }
- public function insultar() {
- echo "Andate a la re concha de tu madre";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement