Tema: Php poo
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 07/07/2014, 12:21
lanero12
 
Fecha de Ingreso: julio-2014
Mensajes: 5
Antigüedad: 9 años, 9 meses
Puntos: 0
Exclamación Respuesta: Php poo

Cita:
Iniciado por ArturoGallegos Ver Mensaje
el error es muy claro, el archivo que procesa los datos no se encuentra en la ruto especificada... revisa las rutas seguro que algo se te esta olvidando.
Amigo, tenias razon, lo estaba llamando mal al IUBanco.php, ahora me sale otro error:
Fatal error: Using $this when not in object context in C:\AppServ\www\Laboratorio13\Ejercicio01\Banco.php on line 8
este la clase.
Banco.php
<?php
class Banco{
Private $capital=0.0;
Private $interes =0.0;
Private $periodos=0;

function setCapital ($capital){
$this->capital=(double)$capital;
}
function getCapital (){
return $this->capital;
}
function setInteres ($interes){
$this->interes=(double)$interes;
}
function getInteres (){
return $this->interes;
}
function setPeriodos ($periodos){
$this->periodos=(int)$periodos;
}
function getPeriodos (){
return $this->periodos;
}
public function getImporte(){
$importe=$this->getCapital()*pow(1+$this->getInteres(),$this->setPeriodos());
return round($importe,2);
}
}