Commit 09fece05 authored by Pronier Julien's avatar Pronier Julien
parents b1f2e10a 554eb658
Pipeline #2876 canceled with stages
target target
org.eclipse.* org.eclipse.*
.project .project
.classpath .classpath
\ No newline at end of file .factorypath
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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" <project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> 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> <groupId>imt</groupId>
<artifactId>tok-chef</artifactId> <artifactId>tok-chef</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version> <java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId> <artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version> <version>5.9.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies>
<build> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<plugins> <dependency>
<plugin> <groupId>org.projectlombok</groupId>
<groupId>org.apache.maven.plugins</groupId> <artifactId>lombok</artifactId>
<artifactId>maven-surefire-plugin</artifactId> <version>1.18.34</version>
<version>3.0.0-M8</version> <scope>provided</scope>
</plugin> </dependency>
</plugins>
</build> </dependencies>
</project>
<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; ...@@ -3,6 +3,9 @@ package imt;
public class Application { public class Application {
public static void main(String[] args) { 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