This file contains 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
<?php | |
/** | |
* Ejemplos de declaración de clases en PHP | |
* | |
*/ | |
class Sesion{ | |
public $ID; | |
public $activa; |
This file contains 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
<?php | |
class Funcionario | |
{ | |
public $ci; | |
public $nombre; | |
public $apellido; | |
} | |
class Firma |
This file contains 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
@startuml EjemploDeDiagramaDeClases | |
'EJEMPLOS PARA DESARROLLAR DIAGRAMAS DE CLASE EN PLANTUML | |
'1 - Clases | |
'Las clases se declaran mediante el bloque class | |
'Los atributos se declaran mediante la sintaxis tipo:nombre | |
'Los métodos se declaran igual que los atributos, pero con un paréntesis luego del nombre | |
' donde se agregan, además, los datos de entrada del método. | |
class ClaseA{ |
This file contains 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
//BLOQUE 6 | |
public boolean archivoExiste(File archivo){ | |
boolean resultado = false; | |
if(archivo.exists() && ! archivo.isDirectory()){ | |
resultado = true; | |
} | |
return resultado; | |
} | |
//FIN DEL BLOQUE 6 |
This file contains 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 Incio { | |
public static void main(String[] args) { | |
System.out.println("Iniciando una nueva partida..."); | |
Partida nuevaPartida = new Partida(); | |
nuevaPartida.VerPuntajes(); | |
} | |
} |
This file contains 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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner teclado = new Scanner(System.in); | |
String[] usuarios = new String[5]; | |
int[] puntajes = new int[5]; |