Skip to content

Instantly share code, notes, and snippets.

@snahor
Created May 3, 2012
Embed
What would you like to do?
<?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