Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tp1e10_Clases;
- public class Cliente extends Persona {
- private int Id_Cliente;
- protected int Nro_Cuenta;
- private String Tipo_Abono;
- private String Datos_Laborales;
- private String Estado;
- public Cliente() {
- }
- public Cliente(String v_nombre, int v_n_cuenta, String v_estado) {
- if (v_nombre != "" && v_n_cuenta >0 && v_estado != "") {
- this.Nombre = v_nombre;
- this.Nro_Cuenta = v_n_cuenta;
- this.Estado = "Activo";
- }else {
- System.out.println ("Valores no admisibles");
- this.Nombre = "Anonimo";
- this.Nro_Cuenta = 999999;
- this.Estado = "No habilitado";
- }
- }
- public void setAbrirCuenta() {
- this.Estado = "Activo";
- }
- public void setCerrarCuenta() {
- this.Estado = "Inactivo";
- }
- public int getNroCuenta() {return this.Nro_Cuenta;}
- public void getOperar() {
- if(this.Estado == "Activo" ) {
- System.out.println ("Este cliente puede operar");
- }else {
- System.out.println ("Este cliente NO puede operar");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement