Skip to content
Snippets Groups Projects
Commit 002583af authored by Alexandre MAINTIER's avatar Alexandre MAINTIER
Browse files

tpOO-04::exo-extension

parent 0a69c473
No related branches found
No related tags found
No related merge requests found
......@@ -71,4 +71,5 @@ public class Person{
}
return true;
}
}
\ No newline at end of file
}
......@@ -18,4 +18,5 @@ class Student{
this.pers = new Person(forename, name);
this.grades[0] = grade;
}
}
\ No newline at end of file
}
package tp04;
public class StudentAbs {
}
package tp04;
public class UsePendingCaseQueue {
public static void main(String[] args) {
PendingCase pc1 = new PendingCase("Alice", "AAA", 1234.56);
PendingCase pc2 = new PendingCase("Bruno", "BBB", 0.42);
PendingCase pc3 = new PendingCase("Chloé", "CCC", 745.99);
PendingCase pc4 = new PendingCase("Denis", "DDD", 125.0);
PendingCaseQueue.CAPACITY = 3;
PendingCaseQueue pcq = new PendingCaseQueue();
System.out.println("Before anything: " + pcq);
System.out.println("Empty? " + pcq.isEmpty() + "\tFull? " + pcq.isFull());
pcq.addOne(pc1);
pcq.addOne(pc2);
System.out.println("After addition of pc1 and pc2: " + pcq);
System.out.println("Empty? " + pcq.isEmpty() + "\tFull? " + pcq.isFull());
pcq.addOne(pc3);
System.out.println("After addition of pc3: " + pcq);
System.out.println("Empty? " + pcq.isEmpty() + "\tFull? " + pcq.isFull());
pcq.addOne(pc4);
System.out.println("After addition of pc4: \t" + pcq);
pcq.removeOne();
System.out.println("After a removal: " + pcq);
pcq.addOne(pc1);
System.out.println("After addition of pc1: " + pcq);
pcq.clear();
System.out.println("After clearing: " + pcq);
}
}
......@@ -26,3 +26,5 @@ public class UsePerson {
if(testsOK) System.out.println("Tests de UsePerson réussis !");
}
}
package tp04;
public class UseStudent {
}
package tp04;
public class UseYearGroup {
}
package tp04;
public class YearGroup {
}
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment