Skip to content

Instantly share code, notes, and snippets.

@edinsoncs
Created March 20, 2018 02:26
Show Gist options
  • Save edinsoncs/8e7eb66e30d214888622cc1b54411372 to your computer and use it in GitHub Desktop.
Save edinsoncs/8e7eb66e30d214888622cc1b54411372 to your computer and use it in GitHub Desktop.
<?php
//Edinson Carranza Saldaña
class CajaAhorro {
//Set attributes
public $titular = 'Edinson Carranza';
public $saldo = '35000';
public $interes = 'Developer';
//Set method
public function imprimirDatos() {
echo $this->titular . '</br>';
echo $this->saldo . '</br>';
echo $this->interes . '</br>';
}
}
$result = new CajaAhorro();
$result->imprimirDatos();
echo "</br>";
class CuentaCorriente {
//set attributes
public $titular = 'Edinson Saldana';
public $saldo = '15000';
public $limite = '8900';
//Set mtehod
public function imprimirDatos() {
echo $this->titular . '</br>';
echo $this->saldo . '</br>';
echo $this->limite . '</br>';
}
}
$show = new CuentaCorriente ();
$show->imprimirDatos();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment