Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2.  
  3.     class Pessoa{
  4.  
  5.         private $nome;
  6.         private $idade;
  7.         private $sexo;
  8.  
  9.         public function fazerAniv(){
  10.             $this->setIdade($this->getIdade() + 1);
  11.         }
  12.  
  13.         public function getNome(){
  14.             return $this->nome;
  15.         }
  16.  
  17.         public function setNome($nome){
  18.             $this->nome = $nome;
  19.         }
  20.  
  21.         public function getIdade(){
  22.             return $this->idade;
  23.         }
  24.  
  25.         public function setIdade($idade){
  26.             $this->idade = $idade;
  27.         }
  28.  
  29.         public function getSexo(){
  30.             return $this->sexo;
  31.         }
  32.  
  33.         public function setSexo($sexo){
  34.             $this->sexo = $sexo;
  35.         }
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement