Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. class Persona {
  2.  
  3.     private $trabajo = false;
  4.     private $experiencia = 0;
  5.    
  6.     public function getTrabajo()
  7.     {
  8.    
  9.         if($this->experiencia > 0)
  10.         {
  11.             $this->trabajo = true;
  12.             echo "Haz conseguido un empleo. En Buenahora!"
  13.             $this->experiencia++ ;
  14.         } else {
  15.             echo "Lo sentimos pero necesitamos a alguien con
  16.                experiencia";
  17.                
  18.             $this->insultar();
  19.         }
  20.     }
  21.    
  22.     public function insultar() {
  23.         echo "Andate a la re concha de tu madre";
  24.    
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement