Created
March 20, 2018 02:26
-
-
Save edinsoncs/8e7eb66e30d214888622cc1b54411372 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
//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