Created
May 3, 2012 18:51
-
-
Save snahor/2588083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Persona | |
{ | |
public $nombres = ''; | |
public $ape_paterno = ''; | |
public $ape_materno = ''; | |
public $edad = null; | |
public function ponerNombresApellidos($nombres, $ape_pat, $ape_mat) | |
{ | |
$this->nombres = $nombres; | |
$this->ape_paterno = $ape_pat; | |
$this->ape_materno = $ape_mat; | |
} | |
} | |
class Paciente extends Persona | |
{ | |
public $enfermedades = array(); | |
public function agregarEnfermedad($enfermedad) | |
{ | |
$this->enfermedades[] = $enfermedad; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment