diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7233f206b205fe5ef7e4cd6d9abd604085a5e1c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.class +*.sh +bin/ +docs/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..89c3b507bbfda93898c5a39f7af58eb3ff68112a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dev-qu"] + path = dev-qu + url = git@gitlab-ssh.univ-lille.fr:alexandre.maintier.etu/dev-qu.git diff --git a/lib/junit-platform-console-standalone-1.10.2.jar b/lib/junit-platform-console-standalone-1.10.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..7ca10e60183a168b228fd60a233281dd697b1cea Binary files /dev/null and b/lib/junit-platform-console-standalone-1.10.2.jar differ diff --git a/lib/junit-platform-console-standalone-1.12.0.jar b/lib/junit-platform-console-standalone-1.12.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..91d6b3e5e19565fd1f48e92766ad9d59d1db6c10 Binary files /dev/null and b/lib/junit-platform-console-standalone-1.12.0.jar differ diff --git a/src/tp01/Book.java b/src/tp01/Book.java new file mode 100644 index 0000000000000000000000000000000000000000..2e91a914dad125b53780cae14de6519d13d02650 --- /dev/null +++ b/src/tp01/Book.java @@ -0,0 +1,22 @@ +class Book{ + String author; + String title; + int year; + + Book(String author, String title, int year){ + this.author = author; + this.title = title; + this.year = year; + } + + public String toString(){ + return this.author + ";" + this.title + ";" + this.year; + } + + boolean isOldest(Book book){ + if(this.year<book.year){ + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/tp01/HighScore.java b/src/tp01/HighScore.java new file mode 100644 index 0000000000000000000000000000000000000000..9913fff02903a8f61e67a16aba113577bbd5e2be --- /dev/null +++ b/src/tp01/HighScore.java @@ -0,0 +1,30 @@ +class HighScore{ + Score[] top; + + HighScore(){ + top = new Score[100]; + } + + HighScore(int taille){ + top = new Score[taille]; + } + + int getNbFreeSlot(){ + int resultat = 0; + for(int i = 0; i<this.top.length; i++){ + if(this.top[i]==null){ + resultat++; + } + } + return resultat; + } + + public String toString(){ + String resultat = ("TOP SCORES : \n"); + for(int i=0; i<this.top.length-this.getNbFreeSlot(); i++){ + resultat = resultat + this.top[i].toString() + "\n"; + } + resultat = resultat + "**" + this.getNbFreeSlot() + "** free slots"; + return resultat; + } +} \ No newline at end of file diff --git a/src/tp01/Score.java b/src/tp01/Score.java new file mode 100644 index 0000000000000000000000000000000000000000..7a99c178ce75756660a7bc0e8a6ca19f0a0ad811 --- /dev/null +++ b/src/tp01/Score.java @@ -0,0 +1,15 @@ +class Score{ + String name; + int score; + String timestamp; + + Score(String name, int score, String timestamp){ + this.name = name; + this.score = score; + this.timestamp = timestamp; + } + + public String toString(){ + return "(" + this.timestamp + ") " + this.name + " = " + this.score; + } +} \ No newline at end of file diff --git a/src/tp01/UseBook.java b/src/tp01/UseBook.java new file mode 100644 index 0000000000000000000000000000000000000000..462f93ecc9707ad63ca8241838d6693a35403d16 --- /dev/null +++ b/src/tp01/UseBook.java @@ -0,0 +1,6 @@ +class UseBook{ + public static void main(String args[]){ + Book book = new Book("chapeau", "pointu", 1992); + System.out.println(book); + } +} \ No newline at end of file diff --git a/src/tp01/UseBook2.java b/src/tp01/UseBook2.java new file mode 100644 index 0000000000000000000000000000000000000000..cbd516c320338fab8e35b7e1a888d215ab461561 --- /dev/null +++ b/src/tp01/UseBook2.java @@ -0,0 +1,20 @@ +class UseBook2{ + public static void main(String[] args){ + Book book1 = new Book("chapeau", "pointu", 1992); + Book book2 = new Book("chapeau", " plus pointu", 1993); + Book book3 = new Book("chapeau", " encore pointu", 1994); + Book book4 = new Book("chapeau", "toujours plus pointu", 1995); + Book book5 = new Book("chapeau", "le plus pointu", 1996); + Book[] bibli = new Book[]{book1,book2,book3,book4,book5}; + Book vieux = bibli[0]; + for(int i = 0; i<bibli.length;i++){ + System.out.println(bibli[i]); + if(i<bibli.length-1){ + if(bibli[i+1].isOldest((bibli[i]))){ + vieux = bibli[i+1]; + } + } + } + System.out.println("le plus vieux est : " + vieux); + } +} \ No newline at end of file diff --git a/src/tp02/Competitor.java b/src/tp02/Competitor.java new file mode 100644 index 0000000000000000000000000000000000000000..d2b3e4bbcc3555647eac4837ec963e696ba820c6 --- /dev/null +++ b/src/tp02/Competitor.java @@ -0,0 +1,46 @@ +class Competitor{ + String numberSign; + int time; + int score; + + Competitor(int min, int sec, int numberSign, int score){ + if(numberSign>=0 && numberSign <=100){ + this.numberSign = "No" + numberSign; + } + this.time = 60*min + sec; + this.score = score; + } + + public String toString(){ + String number; + if(this.numberSign == null){ + number = "-invalide-"; + } + else{ + number = this.numberSign; + } + return number + ", " + this.score + " points, " + this.time + " s"; + } + + boolean equals(Competitor other){ + if(other == null){ + return false; + } + if(this.numberSign == null || other.numberSign == null){ + if(this.numberSign != other.numberSign){ + return false; + } + } + if(this.numberSign.equals(other.numberSign) && this.score == other.score && this.time == other.time){ + return true; + } + return false; + } + + boolean isFaster(Competitor other){ + if(this.time<other.time){ + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/tp02/UseCompetitor2.java b/src/tp02/UseCompetitor2.java new file mode 100644 index 0000000000000000000000000000000000000000..2ee24cffd328c744fb32fb19073ae959eca78d48 --- /dev/null +++ b/src/tp02/UseCompetitor2.java @@ -0,0 +1,18 @@ +public class UseCompetitor2 { + public static void main(String[] args) { + Competitor alice = new Competitor(1, 45, 15, 20); + Competitor bruno = new Competitor(1, 45, 15, 20); + Competitor clement = new Competitor(2, 32, 12, 45); + Competitor dora = new Competitor(2, 34, 12, 45); + Competitor reference = new Competitor(2,2,13,50); + System.out.println("Alice:" + alice + " Bruno:" + bruno + "->" + alice.equals(bruno)); + System.out.println("Alice:" + alice + " null:" + null + "->" + alice.equals(null)); + System.out.println("Alice:" + alice + " Alice:" + alice + "->" + alice.equals(alice)); + System.out.println("Alice:" + alice + " Clement:" + clement + "->" + alice.equals(clement)); + System.out.println("Clement:" + clement + " Dora:" + dora + "->" + clement.equals(dora)); + System.out.println("Alice plus rapide que reference : " + alice.time + "vs" + reference.time + "->" + alice.isFaster(reference)); + System.out.println("Bruno plus rapide que reference : " + bruno.time + "vs" + reference.time + "->" + bruno.isFaster(reference)); + System.out.println("Clement plus rapide que reference : " + clement.time + "vs" + reference.time + "->" + clement.isFaster(reference)); + System.out.println("Dora plus rapide que reference : " + dora.time + "vs" + reference.time + "->" + dora.isFaster(reference)); + } +} \ No newline at end of file diff --git a/src/tp03/Card.java b/src/tp03/Card.java new file mode 100644 index 0000000000000000000000000000000000000000..4a4e3a8acf063d6eba48249fd483cb82ab1c73f3 --- /dev/null +++ b/src/tp03/Card.java @@ -0,0 +1,35 @@ +package tp03; + +public class Card{ + Color color; + Rank rank; + + Card(Color color, Rank rank){ + this.color=color; + this.rank=rank; + } + + Card(String color, String rank){ + this.color = Color.valueOf(color); + this.rank = Rank.valueOf(rank); + } + + Color getColor(){ + return this.color; + } + + Rank getRank(){ + return this.rank; + } + + Boolean equals(Card other){ + if(this.color == other.color && this.rank == other.rank){ + return true; + } + return false; + } + + public String toString(){ + return "couleur = " + this.color + ", rang = " + rank; + } +} \ No newline at end of file diff --git a/src/tp03/Color.java b/src/tp03/Color.java new file mode 100644 index 0000000000000000000000000000000000000000..47cb94859ba593c492d12126d344a9548077f5b5 --- /dev/null +++ b/src/tp03/Color.java @@ -0,0 +1,5 @@ +package tp03; + +public enum Color { + CLUB, DIAMOND, HEART, SPADE; +} \ No newline at end of file diff --git a/src/tp03/Rank.java b/src/tp03/Rank.java new file mode 100644 index 0000000000000000000000000000000000000000..78c72e916c38ddc1f2a570fc38b28da7faa3dd91 --- /dev/null +++ b/src/tp03/Rank.java @@ -0,0 +1,5 @@ +package tp03; + +public enum Rank { + SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE; +} \ No newline at end of file diff --git a/src/tp03/UseCard.java b/src/tp03/UseCard.java new file mode 100755 index 0000000000000000000000000000000000000000..7064098d7d946ce766a8cc97912d5873e99b0dbe --- /dev/null +++ b/src/tp03/UseCard.java @@ -0,0 +1,16 @@ +package tp03; + +public class UseCard { + public static void main(String[] args) { + Card c1 = new Card(Color.HEART, Rank.TEN); + Card c2 = new Card(Color.HEART, Rank.JACK); + Card c3 = new Card(Color.DIAMOND, Rank.TEN); + Card c4 = new Card(Color.CLUB, Rank.SEVEN); + Card c5 = new Card(Color.SPADE, null); + Card c6 = new Card(null, Rank.JACK); + Card c7 = new Card(Color.HEART, Rank.TEN); + // equals scenario + if(!c1.equals(c1) || c1.equals(null) || c1.equals(c2) || c1.equals(c3) || c1.equals(c4) || c1.equals(c5) || c1.equals(c6) || !c1.equals(c7)) + System.out.println("equals FAILED"); + } +} diff --git a/src/tp03/tp03_res.jar b/src/tp03/tp03_res.jar new file mode 100644 index 0000000000000000000000000000000000000000..dcda6fd9fe22eae67e564dfdf4edc35375ccb230 Binary files /dev/null and b/src/tp03/tp03_res.jar differ diff --git a/src/tp04/Person.java b/src/tp04/Person.java new file mode 100644 index 0000000000000000000000000000000000000000..72d48342b56a95cbf99f028e26b1af4d1e61a785 --- /dev/null +++ b/src/tp04/Person.java @@ -0,0 +1,74 @@ +package tp04; + +public class Person{ + private int id; + private String forename; + private String name; + + Person(int id, String forename, String name){ + this.id = id; + this.forename = forename; + this.name = name; + } + + Person(String forename, String name){ + this.id = 0; + this.forename = forename; + this.name = name; + } + + public int getId(){ + return this.id; + } + + public String getForename(){ + return this.forename; + } + + public String getName(){ + return this.name; + } + + public void setForename(String forename){ + this.forename = forename; + } + + public void setName(String name){ + this.name = name; + } + + public String toString(){ + return "<" + this.id + "> : <" + this.forename + "> <" + name+ ">"; + } + + public boolean equals(Object obj) { + if(this == obj){ + return true; + } + if(obj == null){ + return false; + } + if(this.getClass() != obj.getClass()){ + return false; + } + Person other = (Person) obj; + if(this.id != other.id){ + return false; + } + if (this.name == null) { + if (other.name != null){ + return false; + } + } else if (!this.name.equals(other.name)){ + return false; + } + if (this.forename == null) { + if (other.forename != null){ + return false; + } + } else if (!this.forename.equals(other.forename)){ + return false; + } + return true; + } +} \ No newline at end of file diff --git a/src/tp04/Student.java b/src/tp04/Student.java new file mode 100644 index 0000000000000000000000000000000000000000..a374d1a476f6846cd14beaf37349d7d09b373be0 --- /dev/null +++ b/src/tp04/Student.java @@ -0,0 +1,21 @@ +package tp04; + +class Student{ + Person pers; + double[] grades = new double[4]; + + Student(Person pers, double[] grades){ + this.pers = pers; + this.grades = grades; + } + + Student(String name, String forename, double[] grades){ + this.pers = new Person(forename, name); + this.grades = grades; + } + + Student(String name, String forename, double grade){ + this.pers = new Person(forename, name); + this.grades[0] = grade; + } +} \ No newline at end of file diff --git a/src/tp04/UsePerson.java b/src/tp04/UsePerson.java new file mode 100644 index 0000000000000000000000000000000000000000..aaf0940b6992750d3a04a452c724321088aee4f9 --- /dev/null +++ b/src/tp04/UsePerson.java @@ -0,0 +1,28 @@ +package tp04; + +public class UsePerson { + public static void main(String[] args) { + Person alice = new Person("Alice", "A"); + Person bruno = new Person("Bruno", "B"); + Person autre = alice; + boolean testsOK = true; + // test des getters + if(!alice.getForename().equals("Alice") || !alice.getName().equals("A") || !bruno.getForename().equals("Bruno") || !bruno.getName().equals("B") || !autre.getForename().equals("Alice") || !autre.getName().equals("A")) { + System.out.println("Erreur de méthodes GET"); + testsOK = false; + } + // test des setters + alice.setForename("Anatole"); + bruno.setName("BB"); + if(!alice.getForename().equals("Anatole") || !alice.getName().equals("A") || !bruno.getForename().equals("Bruno") || !bruno.getName().equals("BB") || !autre.getForename().equals("Anatole") || !autre.getName().equals("A")) { + System.out.println("Erreur de méthodes SET"); + testsOK = false; + } + // test du equals + if(alice.equals(bruno) || !alice.equals(autre)) { + System.out.println("Erreur de méthode equals"); + testsOK = false; + } + if(testsOK) System.out.println("Tests de UsePerson réussis !"); + } +} diff --git a/src/tp06/Company.java b/src/tp06/Company.java new file mode 100644 index 0000000000000000000000000000000000000000..0d7a3b054da3a972d3fcd9ea914da26c227871db --- /dev/null +++ b/src/tp06/Company.java @@ -0,0 +1,68 @@ +package tp06; +import java.util.ArrayList; +import java.time.LocalDate; + +public class Company{ + + private ArrayList<Employee> staff = new ArrayList<>(); + + public void addEmployee(Employee employe){ + staff.add(employe); + } + + public void removeEmployee(int id){ + staff.remove(id); + } + + public void removeEmployee(Employee employe){ + staff.remove(employe); + } + + public String toString(){ + return "give us your soul"; + } + + public int getNbEmployee(){ + return staff.size(); + } + + public int getNbWorker(){ + int resultat = 0; + for(int i = 0; i<staff.size(); i++){ + if(staff.get(i).getTitle() == "Travailleur"){ + resultat ++; + } + } + return resultat; + } + + public int getNbSalesPerson(){ + int resultat = 0; + for(int i = 0; i<staff.size(); i++){ + if(staff.get(i).getTitle() == "Vendeur"){ + resultat ++; + } + } + return resultat; + } + + public void firing(LocalDate fatefulDate){ + ArrayList<Employee> vire = new ArrayList<>(); + for(int i = 0; i<staff.size(); i++){ + if(fatefulDate.isBefore(staff.get(i).getHiringDate())){ + vire.add(staff.get(i)); + } + } + staff.removeAll(vire); + } + + public void firing(){ + ArrayList<Employee> vire = new ArrayList<>(); + for(int i = 0; i<staff.size(); i++){ + if(!staff.get(i).objectiveFulfilled()){ + vire.add(staff.get(i)); + } + } + staff.removeAll(vire); + } +} diff --git a/src/tp06/CompanyTest.java b/src/tp06/CompanyTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f10ebb3d164be625f64576a41cb86b52aed5ec3b --- /dev/null +++ b/src/tp06/CompanyTest.java @@ -0,0 +1,126 @@ +package tp06; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.time.LocalDate; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class CompanyTest { + private Employee ts1, ts2, v1, w1, w2; + private Company society; + + @BeforeEach + public void initialization() { + ts1 = new TravellingSalesperson("ts-A", LocalDate.now().minusDays(20), 20000); + ts2 = new TravellingSalesperson("ts-B", LocalDate.now().minusDays(5), 2); + v1 = new Vendor("v-A", LocalDate.now().minusDays(20), 20000); + w1 = new Worker("w-A", LocalDate.now().minusDays(20), 2000); + w2 = new Worker("w-B", LocalDate.now().minusDays(5), 2); + society = new Company(); + } + + @Test + public void hiringSalesPersonTest() { + assertEquals(0, society.getNbEmployee()); + society.addEmployee(ts1); + assertEquals(1, society.getNbEmployee()); + assertEquals(0, society.getNbWorker()); + assertEquals(1, society.getNbSalesPerson()); + society.addEmployee(ts2); + assertEquals(2, society.getNbEmployee()); + assertEquals(0, society.getNbWorker()); + assertEquals(2, society.getNbSalesPerson()); + society.addEmployee(v1); + assertEquals(3, society.getNbEmployee()); + assertEquals(0, society.getNbWorker()); + assertEquals(3, society.getNbSalesPerson()); + } + + @Test + public void hiringWorkerTest() { + assertEquals(0, society.getNbEmployee()); + society.addEmployee(w1); + assertEquals(1, society.getNbEmployee()); + assertEquals(1, society.getNbWorker()); + assertEquals(0, society.getNbSalesPerson()); + society.addEmployee(w2); + assertEquals(2, society.getNbEmployee()); + assertEquals(2, society.getNbWorker()); + assertEquals(0, society.getNbSalesPerson()); + } + + private void hiring() { + society.addEmployee(ts1); + society.addEmployee(ts2); + society.addEmployee(v1); + society.addEmployee(w1); + society.addEmployee(w2); + } + private void hiring_alternative() { + society.addEmployee(ts1); + society.addEmployee(v1); + society.addEmployee(w1); + } + + @Test + public void firingDate_none() { + hiring(); + assertEquals(5, society.getNbEmployee()); + assertEquals(3, society.getNbSalesPerson()); + assertEquals(2, society.getNbWorker()); + society.firing(LocalDate.now()); + assertEquals(5, society.getNbEmployee()); + assertEquals(3, society.getNbSalesPerson()); + assertEquals(2, society.getNbWorker()); + } + + @Test + public void firingDate_all() { + hiring(); + assertEquals(5, society.getNbEmployee()); + assertEquals(3, society.getNbSalesPerson()); + assertEquals(2, society.getNbWorker()); + society.firing(LocalDate.now().minusDays(50)); + assertEquals(0, society.getNbEmployee()); + assertEquals(0, society.getNbSalesPerson()); + assertEquals(0, society.getNbWorker()); + } + + @Test + public void firingDate_some() { + hiring(); + assertEquals(5, society.getNbEmployee()); + assertEquals(3, society.getNbSalesPerson()); + assertEquals(2, society.getNbWorker()); + society.firing(LocalDate.now().minusDays(10)); + assertEquals(3, society.getNbEmployee()); + assertEquals(2, society.getNbSalesPerson()); + assertEquals(1, society.getNbWorker()); + } + + @Test + public void firingObjective_none() { + hiring_alternative(); + assertEquals(3, society.getNbEmployee()); + assertEquals(2, society.getNbSalesPerson()); + assertEquals(1, society.getNbWorker()); + society.firing(); + assertEquals(3, society.getNbEmployee()); + assertEquals(2, society.getNbSalesPerson()); + assertEquals(1, society.getNbWorker()); + } + + @Test + public void firingObjective_some() { + hiring(); + assertEquals(5, society.getNbEmployee()); + assertEquals(3, society.getNbSalesPerson()); + assertEquals(2, society.getNbWorker()); + society.firing(); + assertEquals(3, society.getNbEmployee()); + assertEquals(2, society.getNbSalesPerson()); + assertEquals(1, society.getNbWorker()); + } +} diff --git a/src/tp06/Employee.java b/src/tp06/Employee.java new file mode 100644 index 0000000000000000000000000000000000000000..970a49333ac68026a9142343dfd8644e250af7c5 --- /dev/null +++ b/src/tp06/Employee.java @@ -0,0 +1,26 @@ +package tp06; +import java.time.LocalDate; + +public abstract class Employee{ + private String name; + private LocalDate hiringDate; + + public Employee(String name, LocalDate hiringDate){ + this.name = name; + this.hiringDate = hiringDate; + } + + public String getName(){ + return this.name; + } + + public LocalDate getHiringDate(){ + return this.hiringDate; + } + + public abstract String getTitle(); + + public abstract double getWages(); + + public abstract boolean objectiveFulfilled(); +} \ No newline at end of file diff --git a/src/tp06/Salesperson.java b/src/tp06/Salesperson.java new file mode 100644 index 0000000000000000000000000000000000000000..4fc1c47a36798bc958c6200eb21e8c81e8ab6735 --- /dev/null +++ b/src/tp06/Salesperson.java @@ -0,0 +1,25 @@ +package tp06; +import java.time.LocalDate; + +abstract class Salesperson extends Employee{ + private double turnover; + public static double objective = 10000; + + public Salesperson(double turnover, String name, LocalDate hiringDate){ + super(name, hiringDate); + this.turnover = turnover; + } + + public double getTurnover(){ + return this.turnover; + } + + public String toString(){ + return this.getName() + ", embauché le " + this.getHiringDate() + "fait un profit de : " + this.getTurnover(); + } + + public boolean objectiveFulfilled(){ + return turnover>=objective; + } + +} \ No newline at end of file diff --git a/src/tp06/TravellingSalesperson.java b/src/tp06/TravellingSalesperson.java new file mode 100644 index 0000000000000000000000000000000000000000..9e828bfaaab6d7d450156ec2de87544d90708f1f --- /dev/null +++ b/src/tp06/TravellingSalesperson.java @@ -0,0 +1,19 @@ +package tp06; +import java.time.LocalDate; + +public class TravellingSalesperson extends Salesperson{ + private final double PERCENTAGE = 0.2; + private final double BONUS = 800; + + public TravellingSalesperson(String nom, LocalDate hiringDate, double turnover){ + super(turnover, nom, hiringDate); + } + + public String getTitle(){ + return "Vendeur"; + } + + public double getWages(){ + return BONUS + PERCENTAGE*this.getTurnover(); + } +} \ No newline at end of file diff --git a/src/tp06/Vendor.java b/src/tp06/Vendor.java new file mode 100644 index 0000000000000000000000000000000000000000..3c07e5e1708034ffd9f3ace4a7d82c7ad4aa6d23 --- /dev/null +++ b/src/tp06/Vendor.java @@ -0,0 +1,20 @@ +package tp06; +import java.time.LocalDate; + +public class Vendor extends Salesperson{ + private final double PERCENTAGE = 0.2; + private final double BONUS = 400; + + + public Vendor(String nom, LocalDate hiringDate, double turnover){ + super(turnover, nom, hiringDate); + } + + public String getTitle(){ + return "Vendeur"; + } + + public double getWages(){ + return BONUS + PERCENTAGE*this.getTurnover(); + } +} diff --git a/src/tp06/Worker.java b/src/tp06/Worker.java new file mode 100644 index 0000000000000000000000000000000000000000..6a0c1a588b384a2007eaa921bb378e84c8ac0b60 --- /dev/null +++ b/src/tp06/Worker.java @@ -0,0 +1,29 @@ +package tp06; +import java.time.LocalDate; + +public class Worker extends Employee{ + private final double BY_UNIT = 5; + private int units; + private static int objective = 1000; + + public Worker(String name, LocalDate hiringDate, int units){ + super(name, hiringDate); + this.units=units; + } + + public String getTitle(){ + return "Travailleur"; + } + + public double getWages(){ + return units*BY_UNIT; + } + + public String toString(){ + return this.getName() + ", embauché le " + this.getHiringDate() + "est payé : " + this.getWages(); + } + + public boolean objectiveFulfilled(){ + return units>=objective; + } +}