Guest User

Untitled

a guest
May 24th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. public class Tester
  2. {
  3. private Society mySoc = new Society("Hatfield");
  4. private Meeting m1 ;
  5. private Meeting m2 ;
  6. private Meeting m3 ;
  7.  
  8. private Student st1; // TASK 5.1
  9. private Student st2; // TASK 5.1
  10. private Student st3; // TASK 5.1
  11. private Student st4; // TASK 5.1
  12.  
  13. public Tester()
  14. {
  15. //Uncomment these statements if you have written the Meeting constructor
  16. //make sure that parameter values match your constructor parameters
  17. m1 = new Meeting("AA1","Kenwood",10,3,25);
  18. m2 = new Meeting("BB1","Coniston",2,4,30);
  19. m3 = new Meeting("CC1","Welsh Harp",10,6,40);
  20.  
  21. // TASK 5.1
  22. st1 = new Student("April",17,123);
  23. st2 = new Student("May",24,234);
  24. st3 = new Student("Junt",19,345);
  25. st4 = new Student("Julie",23,456);
  26. }
  27.  
  28. public void doTest()
  29. {
  30. // TASK 5.2
  31. mySoc.addMeeting(m1);
  32. mySoc.addMeeting(m2);
  33. mySoc.addMeeting(m3);
  34. // TASK 5.3
  35. m1.setRaceDate(31,03,2010);
  36. // TASK 5.3
  37. mySoc = new Society("Hatfield");
  38. // TASK 5.2
  39. mySoc.addStudent(st1);
  40. mySoc.addStudent(st2);
  41. mySoc.addStudent(st3);
  42. mySoc.addStudent(st4);
  43. // TASK 5.4
  44. m1.signUp(st2);
  45. m1.signUp(st1);
  46. // TASK 5.4
  47. m2.signUp(st1);
  48. m2.signUp(st2);
  49. m2.signUp(st3);
  50. // TASK 5.5
  51. m2.withdraw(st2);
  52. // TASK 5.6
  53. mySoc.printAllInfo();
  54. System.out.println("\n**********************************");
  55.  
  56. }
  57. }
Add Comment
Please, Sign In to add comment