This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Persona persona = new Persona(); | |
persona.dibujaPersona(); | |
Cliente cliente = new Cliente(); | |
cliente.mostrarCliente(34,"Fernando Ferrufino",76959996,237.935); | |
Trabajador trabajador = new Trabajador(); | |
trabajador.mostrarTrabajador(51,"Nestor Montaño",60732580,2.948); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Persona persona = new Persona(); | |
persona.setEdad(25); | |
persona.setNombre("Nelson Montaño"); | |
persona.setTelefono(4725127); | |
System.out.println("Edad --> " + persona.getEdad()); | |
System.out.println("Nombre --> " + persona.getNombre()); | |
System.out.println("Telefono --> " + persona.getTelefono()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
int numeroIf = 0; | |
if (numeroIf>0) | |
System.out.println("La variable numeroIf es POSITIVA"); | |
else | |
System.out.println("La variable numeroIf es NEGATIVA"); | |
System.out.println("----------------------------------------"); | |
while (numeroIf<3){ | |
numeroIf++; |