Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tp1e10_Clases;
- public class CuentaBancaria extends Cliente {
- private String Tipo_Cuenta;
- protected float Saldo;
- private String Informacion;
- private String Estado_Mensual;
- private String Cargos_Abonos;
- private String Ultimas_Operaciones;
- public CuentaBancaria() {
- }
- public CuentaBancaria(int v_n_cuenta, String v_t_cuenta, float v_saldo) {
- if (v_n_cuenta != 0 && v_t_cuenta != "" && v_saldo >=0) {
- this.Nro_Cuenta = v_n_cuenta;
- this.Tipo_Cuenta = v_t_cuenta;
- this.Saldo = v_saldo;
- }else {
- System.out.println ("Valores no admisibles");
- this.Nro_Cuenta = 999999;
- this.Tipo_Cuenta = "Pesos";
- this.Saldo = 000000;
- }
- }
- public void setTipoCuenta(String v_t_cuenta) {
- if(v_t_cuenta != "") {
- this.Tipo_Cuenta = v_t_cuenta;
- }else {
- System.out.println ("Valores no admisibles");
- }
- }
- public void setSaldo(float v_saldo) {
- if(v_saldo >= 0) {
- this.Saldo = v_saldo;
- }else {
- System.out.println ("Valores no admisibles");
- }
- }
- public String getEstadoMensual() {return this.Estado_Mensual;}
- public void getImprimir() {
- String v_imprimir = "Saldo:"+""+this.Saldo+","+"Ultimas Operaciones:"+""+this.Ultimas_Operaciones;
- System.out.println(v_imprimir);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement