Advertisement
bulkest

Untitled

Jul 26th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. package ru.geekbrains.java_level_one.Lesson_four;
  2.  
  3. import com.sun.org.apache.xpath.internal.operations.String;
  4.  
  5. /**
  6. * Created by alex on 26.07.2017.
  7. */
  8. public class Employee {
  9.  
  10. //создать класс сотрудник с полями ФИО и зарплата
  11.  
  12. private String namesEmpl;
  13. private int salaryEmpl;
  14. private int ageEmploy;
  15.  
  16. Employee(int money, int age, String competitor) {
  17. namesEmpl = competitor;
  18. salaryEmpl = money;
  19. ageEmploy = age;
  20. }
  21.  
  22. private String nameRead() {
  23. if (namesEmpl != null) return namesEmpl;
  24. return null;
  25. }
  26.  
  27. private int salaryRead() {
  28. if (salaryEmpl >= 0) return salaryEmpl;
  29. return 0;
  30. }
  31.  
  32. private boolean ageEmploy() {
  33. if (ageEmploy >= 18) return true;
  34. return false;
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement