Advertisement
Guest User

Untitled

a guest
Mar 11th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. Student andrei=new Student("Andrei","andrei@gmail.com");
  2. Student mihai=new Student("Mihai","mihai@gmail.com");
  3. Student george=new Student("George","george@gmail.com");
  4. Student ana=new Student("Ana","ana@gmail.com");
  5. Lecturer popescu=new Lecturer("Popescu","popescu@gmail.com",3);
  6. Lecturer ionescu=new Lecturer("Ionescu","ionescu@gmail.com",2);
  7. Lecturer andries=new Lecturer("Andries","andries@gmail.com",4);
  8. Lecturer dumea=new Lecturer("Dumea","dumea@gmail.com",2);
  9. Project matlab=new Project("Matlab",2,dumea);
  10. Project sgbd=new Project("SGBD",2,popescu);
  11. Project java=new Project("JAVA",2,popescu);
  12. Project acso=new Project("ACSO",3,ionescu);
  13. Project crypto=new Project("Crypto",2,andries);
  14. Project fai=new Project("FAI",2,andries);
  15.  
  16.  
  17. andrei.addPreference(java);
  18. andrei.addPreference(sgbd);
  19. andrei.addPreference(crypto);
  20. andrei.addPreference(acso);
  21.  
  22. mihai.addPreference(crypto);
  23. mihai.addPreference(fai);
  24. mihai.addPreference(matlab);
  25.  
  26. george.addPreference(matlab);
  27. george.addPreference(crypto);
  28. george.addPreference(sgbd);
  29. george.addPreference(fai);
  30.  
  31. ana.addPreference(sgbd);
  32. ana.addPreference(matlab);
  33. ana.addPreference(acso);
  34. ana.addPreference(crypto);
  35.  
  36.  
  37. popescu.addPreference(mihai);
  38. popescu.addPreference(george);
  39. popescu.addPreference(andrei);
  40. popescu.addPreference(ana);
  41.  
  42. ionescu.addPreference(george);
  43. ionescu.addPreference(mihai);
  44. ionescu.addPreference(andrei);
  45.  
  46. andries.addPreference(andrei);
  47. andries.addPreference(george);
  48. andries.addPreference(ana);
  49.  
  50. dumea.addPreference(ana);
  51. dumea.addPreference(andrei);
  52. dumea.addPreference(george);
  53.  
  54. allStudentsGlobal.addElement(george);
  55. allStudentsGlobal.addElement(ana);
  56. allStudentsGlobal.addElement(mihai);
  57. allStudentsGlobal.addElement(andrei);
  58.  
  59. allLecturersGlobal.addElement(dumea);
  60. allLecturersGlobal.addElement(andries);
  61. allLecturersGlobal.addElement(ionescu);
  62. allLecturersGlobal.addElement(popescu);
  63.  
  64. allProjectsGlobal.addElement(fai);
  65. allProjectsGlobal.addElement(crypto);
  66. allProjectsGlobal.addElement(acso);
  67. allProjectsGlobal.addElement(java);
  68. allProjectsGlobal.addElement(sgbd);
  69. allProjectsGlobal.addElement(matlab);
  70.  
  71. mainProblem.allocStudent();
  72.  
  73. System.out.println("Student preferences:");
  74. Iterator <Student> it=allStudentsGlobal.iterator();
  75. while(it.hasNext()){
  76. System.out.println(it.next().getProject().getNume());
  77. }
  78. System.out.println();
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement