So I am continuing my previous code, in conclusion I am doing a bank (as a work for university). So, now the class name is CuentaBancaria.java
. The block code is the following:
package fp2.poo.pfpooWFG8420;
import fp2.poo.utilidades.CuentaBancariaInterfaz;
import fp2.poo.utilidades.SaldoInterfaz;
import fp2.poo.utilidades.Excepciones.OperacionNoPermitidaExcepcion;
import fp2.poo.pfpooWFG8420.Titular;
import fp2.poo.utilidades.TelefonoInterfaz;
import fp2.poo.utilidades.CorreoElectronicoInterfaz;
import fp2.poo.pfpooWFG8420.NumeroDeCuenta;
import fp2.poo.pfpooWFG8420.Saldo;
/**
* Implementacion de la clase CuentaBancaria a partir de una
* interfaz
*
*/
public class CuentaBancaria implements CuentaBancariaInterfaz {
// Atributos
private Saldo saldo;
private NumeroDeCuenta numeroDeCuenta;
private Titular titular;
// Constructor
/**
* Constructor de CuentaBancaria
*
* @see CuentaBancaria#CuentaBancaria()
*/
public CuentaBancaria() {
this.saldo = new Saldo();
this.numeroDeCuenta = new NumeroDeCuenta();
this.titular = new Titular();
}
// Metodos
// Hereda comentarios de documentacion
public void setSaldo(Saldo saldo) {
this.saldo = saldo;
}
// Hereda comentarios de documentacion
public Saldo getSaldo() {
return this.saldo;
}
// Hereda comentarios de documentacion
public void setNumeroDeCuenta(NumeroDeCuenta numeroDeCuenta) {
this.numeroDeCuenta = numeroDeCuenta;
}
// Hereda comentarios de documentacion
public NumeroDeCuenta getNumeroDeCuenta() {
return this.numeroDeCuenta;
}
// Hereda comentarios de documentacion
public void setTitular(Titular titular) {
this.titular = titular;
}
// Hereda comentarios de documentacion
public Titular getTitular() {
return this.titular;
}
}
I recicled this from another work I did weeks ago, and modified it a little bit, with the needed things. So I compiled it, I do not know yet If I have code mistakes, and the MATE Terminal put the following error:
CuentaBancaria is not abstract and does not override abstract method setTitular(TitularInterfaz) in CuentaBancariaInterfaz
public class CuentaBancaria implements CuentaBancariaInterfaz {
So what I tried was fixing it the same way I did previously with another class which was changing some stuff, and looking If there were any destinations put wrongly. I expected that it was gonna be that, and indeed it was partially, the other errors I fixed it because the makefile I made, I forgot to put ./bin/fp2/poo/pfpooWFG8420/Saldo.class
, though this is not that so I do not know a way that can fix it everytime.
I will keep try to and If I fix it, I will post it. Thank you for looking on it if you do so, and thanks for the help!
RODSIN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.