Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Tester
- {
- private Society mySoc = new Society("Hatfield");
- private Meeting m1 ;
- private Meeting m2 ;
- private Meeting m3 ;
- private Student st1; // TASK 5.1
- private Student st2; // TASK 5.1
- private Student st3; // TASK 5.1
- private Student st4; // TASK 5.1
- public Tester()
- {
- //Uncomment these statements if you have written the Meeting constructor
- //make sure that parameter values match your constructor parameters
- m1 = new Meeting("AA1","Kenwood",10,3,25);
- m2 = new Meeting("BB1","Coniston",2,4,30);
- m3 = new Meeting("CC1","Welsh Harp",10,6,40);
- // TASK 5.1
- st1 = new Student("April",17,123);
- st2 = new Student("May",24,234);
- st3 = new Student("Junt",19,345);
- st4 = new Student("Julie",23,456);
- }
- public void doTest()
- {
- // TASK 5.2
- mySoc.addMeeting(m1);
- mySoc.addMeeting(m2);
- mySoc.addMeeting(m3);
- // TASK 5.3
- m1.setRaceDate(31,03,2010);
- // TASK 5.3
- mySoc = new Society("Hatfield");
- // TASK 5.2
- mySoc.addStudent(st1);
- mySoc.addStudent(st2);
- mySoc.addStudent(st3);
- mySoc.addStudent(st4);
- // TASK 5.4
- m1.signUp(st2);
- m1.signUp(st1);
- // TASK 5.4
- m2.signUp(st1);
- m2.signUp(st2);
- m2.signUp(st3);
- // TASK 5.5
- m2.withdraw(st2);
- // TASK 5.6
- mySoc.printAllInfo();
- System.out.println("\n**********************************");
- }
- }
Add Comment
Please, Sign In to add comment