Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package Banco;
  7.  
  8. /**
  9.  *
  10.  * @author alumno
  11.  */
  12. public class CuentaPpal {
  13.     public static void main (String[] args){
  14.      
  15.       Cuenta cuenta_1=new Cuenta("Juan", 1000);
  16.       Cuenta cuenta_2=new Cuenta("Jose", 0);
  17.        
  18.       cuenta_1.depositar(1000);
  19.       cuenta_2.depositar(500);
  20.      
  21.         System.out.println(cuenta_1.toString());//juan y 1000
  22.         System.out.println(cuenta_2.toString ());//jose y 0
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement