Responder dúvida

Seja o primeiro a responder

Duvida sobre programação.

PHP PHP GERAL php Programação Orientada a Objetos

Olá tudo bem ?

Estou tentando fazer um atividade da faculdade mas não estou consegui resolver. 

Coloquei no ide e esta dando este erro.

 

PHP Parse error:  syntax error, unexpected token "class", expecting "function" or "const" in /workspace/Vendedor.php on line 17


<?php
    class Usuario{
 public $nome;
 public $senha;
 public $cidade;

 function Usuario(){
  $this->CadastroUsuario();
 }

 private function CadastroUsuario(){
  $this->nome ="Marcos Paulo";
  $this->senha ="Mp?123";
  $this->cidade = "São Paulo";
 }

class Vendedor extends Usuario{
 public $telefone;
 public $email;
 public $idade;
}

 function Vendedor(){
 parent::Usuario();
 $this->telefone = '011003456000'
 $this->email = 'marcospp@bloggs.com'
 }
 
 
 public funtion getNome(){
  return $this->nome;
 }

 public funtion getSenha(){
  return $this->senha;
 }

 public funtion getCidade(){
  return $this->cidade;
 }

 public funtion getTelefone(){
  return $this->telefone;
 }

 public funtion getEmail(){
  return $this->email;
 }

 public funtion getIdade(){
  return $this->idade;
 }

 

 function display()
 {
 echo "Nome:  " . $this->nome     . "<br>";
 echo "Idade:  " . $this->idade . "<br>";
 echo "Senha:  " . $this->senha . "<br>";
 echo "Cidade: " . $this->cidade . "<br>";
 echo "Telefone: " . $this->telefone . "<br>";
 echo "Email:  " . $this->email . "<br>";

}

 

Agradeço pela ajuda

Foto de Renan O.
Renan perguntou há 2 anos