Commit 09fece05 authored by Pronier Julien's avatar Pronier Julien
parents b1f2e10a 554eb658
Pipeline #2876 canceled with stages
target
org.eclipse.*
.project
.classpath
\ No newline at end of file
.classpath
.factorypath
\ No newline at end of file
<?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>
<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>imt</groupId>
<artifactId>tok-chef</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>imt</groupId>
<artifactId>tok-chef</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M8</version>
</plugin>
</plugins>
</build>
</project>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M8</version>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -3,6 +3,9 @@ package imt;
public class Application {
public static void main(String[] args) {
System.out.println("Hello World!");
var chef = new Chef(1, "Caca", "Pipi", "DQSQFQSF", Genre.HOMME, 3, Specialite.CUISINIER);
var padawan = new Padawan(1, "Hazebrouck", "Antoine", "06 51 73 08 05", Genre.HOMME, chef);
System.out.println(padawan);
}
}
package imt;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Data
public class Chef extends Person {
private final int etoiles;
private final Specialite specialite;
public Chef(int id, String nom, String prenom, String telephone, Genre genre, int etoiles, Specialite specialite) {
super(id, nom, prenom, telephone, genre);
this.etoiles = etoiles;
this.specialite = specialite;
}
}
package imt;
public enum Genre {
HOMME,FEMME
}
// package imt;
// import lombok.Data;
// import lombok.EqualsAndHashCode;
// @EqualsAndHashCode(callSuper = true)
// @Data
// public class Jury extends Person {
// // private final int TODO faire les jurys
// public Jury() {
// super(null, null, null, null, null);
// }
// }
// TODO finir quand les Jurys sont finito
\ No newline at end of file
package imt;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Data
public class Padawan extends Person {
private final Chef chef;
public Padawan(int id, String nom, String prenom, String telephone, Genre genre, Chef chef) {
super(id, nom, prenom, telephone, genre);
this.chef = chef;
}
}
package imt;
import lombok.Data;
@Data
public abstract class Person {
private final int id;
private final String nom;
private final String prenom;
private final String telephone;
private final Genre genre;
}
package imt;
public enum Specialite {
CUISINIER, PATISSIER, TRAVAIL_A_DISTANCE
}
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 to comment