JuanMtz

Jvida.java

Nov 28th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. package _main;
  2.  
  3. import java.util.Date;
  4. import modelo.Sesion;
  5. import modelo.Usuario;
  6.  
  7. public class JVida {
  8.  
  9.     public static void main(String[] args) {
  10.  
  11.         Usuario usr1 = new Usuario();
  12.         Usuario usr2 = new Usuario("49194187Q", "José Juan", "Solano Martínez", "Calle Callosa",
  13.                 "[email protected]", new Date(98, 05, 22), new Date(119, 11, 26),
  14.                 "PepeGrillo", Usuario.ROLES[1]);
  15.        
  16.         System.out.println(usr2.toString());
  17.        
  18.  
  19.         usr1.setNif("");
  20.         usr1.setNombre("Juan José");
  21.         usr1.setApellidos("Martínez Solano");
  22.         usr1.setDomicilio("C/ Madre Elisea Oliver Molina, 15, 3ºB");
  23.         usr1.setCorreo("[email protected]");
  24.         // Mes = (mes real - 1); año = (año real - 1900)
  25.         usr1.setFechaNacimiento(new Date(98, 05, 22));
  26.         usr1.setFechaAlta(new Date(119 ,11, 25));
  27.         usr1.setClaveAcceso("GrilloPepe");
  28.         usr1.setRol("NORMAL");
  29.  
  30.         System.out.println(usr1);
  31.  
  32.         Sesion dato = new Sesion();
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment