Commit f0b71045 by Pedro J Sanchez

v0.1 Punto de partida para la segunda práctica

parents
# Created by https://www.gitignore.io/api/code-java,java,java-web
# Edit at https://www.gitignore.io/?templates=code-java,java,java-web
### Code-Java ###
# Language Support for Java(TM) by Red Hat extension for Visual Studio Code - https://marketplace.visualstudio.com/items?itemName=redhat.java
.project
.classpath
factoryConfiguration.json
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Java-Web ###
## ignoring target file
target/
# End of https://www.gitignore.io/api/code-java,java,java-web
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath com.uja.ssccdd.curso1920.solucionpractica1.SolucionPractica1</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>es.uja.ssccdd.curso1920</groupId>
<artifactId>SolucionPractica2</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<name>SolucionPractica2</name>
</project>
\ No newline at end of file
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package es.uja.ssccdd.curso1920.solucionpractica2;
import java.util.Random;
/**
* Constantes, tipo enumerado y generador de numeros aleatorios necesarios para
* la ejecucion de la aplicacion
* @author fconde
*/
public class Constantes {
// - Generador de numeros aleatorio ----------------------------------------
public static final Random aleatorio = new Random();
// - Tipo enumerado --------------------------------------------------------
public enum Prioridad {
BAJA(0), ALTA(1);
private final int valor;
private Prioridad(int valor) {
this.valor = valor;
}
public static Prioridad getPrioridadAleatoria() {
int valorAleatorio = aleatorio.nextInt(MAX_VALOR_PRIORIDAD);
return Prioridad.values()[valorAleatorio];
}
}
// - Constantes ------------------------------------------------------------
public static final int MAX_VALOR_PRIORIDAD = 2;
public static final int VARIACION_TIEMPO = 2;
public static final int MIN_TIEMPO_FOTOGRAMA = 2;
public static final int TIEMPO_FINALIZACION_ESCENA = 2;
public static final int MIN_NUM_FOTOGRAMAS = 3;
public static final int VARIACION_NUM_FOTOGRAMAS = 3;
public static final int MIN_NUM_ESCENAS = 3;
public static final int VARIACION_NUM_ESCENAS = 3;
public static final int MIN_TIEMPO_GENERACION = 3;
public static final int NUM_GENERADORES = 4;
public static final int NUM_RENDERIZADORES = 3;
public static final int MAX_ESCENAS_EN_ESPERA = 4;
}
\ No newline at end of file
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package es.uja.ssccdd.curso1920.solucionpractica2;
/**
* Clase principal del programa.
* @author fconde
*/
public class SolucionPractica2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("** Hilo(PRINCIPAL): Ha iniciado la ejecucion\n");
System.out.println("** Hilo(PRINCIPAL): Ha finalizado la ejecucion");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment