Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ru.geekbrains.java_level_one.Lesson_four;
- import com.sun.org.apache.xpath.internal.operations.String;
- /**
- * Created by alex on 26.07.2017.
- */
- public class Employee {
- //создать класс сотрудник с полями ФИО и зарплата
- private String namesEmpl;
- private int salaryEmpl;
- private int ageEmploy;
- Employee(int money, int age, String competitor) {
- namesEmpl = competitor;
- salaryEmpl = money;
- ageEmploy = age;
- }
- private String nameRead() {
- if (namesEmpl != null) return namesEmpl;
- return null;
- }
- private int salaryRead() {
- if (salaryEmpl >= 0) return salaryEmpl;
- return 0;
- }
- private boolean ageEmploy() {
- if (ageEmploy >= 18) return true;
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement