mvsp

aula 7

Jul 21st, 2021
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4. class Veiculo{
  5.     public $modelo;
  6.     public $cor;
  7.     public $ano;
  8.  
  9.     private function Andar(){
  10.         echo $this->modelo." andou";
  11.     }
  12.  
  13.     public function Parar(){
  14.         echo $this->modelo." parou";
  15.     }
  16.  
  17.     public function mostarAcao(){
  18.         $this->Andar();
  19.     }
  20.  
  21. }
  22.  
  23. $carro = new Veiculo;
  24. $carro->mostarAcao();
RAW Paste Data