Advertisement
TsetsoP

application

Oct 28th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. public class Applications extends Employee{ //Взима полетата от Employee
  2. private int age, experience;
  3. private String education;
  4.  
  5. public Applications() {
  6.  
  7. }
  8.  
  9. public Applications(String name, String family, String egn, int age, int experience, String education) {
  10. super(name,family,egn);
  11. this.age = age;
  12. this.experience = experience;
  13. this.education = education;
  14.  
  15. }
  16.  
  17. public int getAge() {
  18. return age;
  19. }
  20.  
  21. public void setAge(int age) {
  22. this.age = age;
  23. }
  24.  
  25. public int getExperience() {
  26. return experience;
  27. }
  28.  
  29. public void setExperience(int experience) {
  30. this.experience = experience;
  31. }
  32.  
  33. public String getEducation() {
  34. return education;
  35. }
  36.  
  37. public void setEducation(String education) {
  38. this.education = education;
  39. }
  40.  
  41.  
  42. public static void getApplications(int enteredAge, int enteredExperience, String enteredEducation, String enteredEGN) {
  43.  
  44. if((enteredAge > 18 && enteredAge <= 65 && enteredExperience > 0 && enteredExperience <= enteredAge-18 && enteredEducation.equalsIgnoreCase("средно" ) && enteredEGN.length()==10) ||
  45. (enteredAge > 18 && enteredAge <= 65 && enteredExperience > 0 && enteredExperience <= enteredAge-18 && enteredEducation.equalsIgnoreCase("висше") && enteredEGN.length()==10) ||
  46. (enteredAge > 18 && enteredAge <= 65 && enteredExperience > 0 && enteredExperience <= enteredAge-18 && enteredEducation.equalsIgnoreCase("бакалавър") && enteredEGN.length()==10) ||
  47. (enteredAge > 18 && enteredAge <= 65 && enteredExperience > 0 && enteredExperience <= enteredAge-18 && enteredEducation.equalsIgnoreCase("магистър") && enteredEGN.length()==10))
  48. {
  49. System.out.println("Приет сте!");
  50. } else if (enteredExperience > enteredAge-18) {
  51. System.out.println("Опита е много за вашите години! Не сте приет!");
  52.  
  53. } else if(enteredEGN.length() != 10){
  54. System.out.println("Невалидно ЕГН! Не сте приет");
  55. }else {
  56. System.out.println("Не сте приет!");
  57. }
  58.  
  59. }
  60.  
  61. }
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement