Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //геттеры и сеттеры
- public String getFullName() {
- return fullName;
- }
- public void setFullName(String fullName) {
- this.fullName = fullName;
- }
- public String getPosition() {
- return position;
- }
- public void setPosition(String position) {
- this.position = position;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public int getPhoneNumber() {
- return phoneNumber;
- }
- public void setPhoneNumber(int phoneNumber) {
- this.phoneNumber = phoneNumber;
- }
- public int getSalary() {
- return salary;
- }
- public void setSalary(int salary) {
- this.salary = salary;
- }
- public byte getAge() {
- return age;
- }
- public void setAge(byte age) {
- this.age = age;
- }
- //параметризированный конструктор
- public Employee(String fullName, String position, String email, int phoneNumber, int salary, byte age) {
- this.fullName = fullName;
- this.position = position;
- this.email = email;
- this.phoneNumber = phoneNumber;
- this.salary = salary;
- this.age = age;
- }
- public static void main(String[] args) {
- Employee [] mas = new Employee[5];
- mas[0] = new Employee("KozlovAA", "developer", "kozlovaa@mail.ru", 123456, 10000, (byte) 30);
- mas[1] = new Employee("IvanovAA", "engineer", "IvanovAA@mail.ru", 321654, 15000, (byte) 35);
- mas[2] = new Employee("PetrovEE", "manager", "PetrovEE@mail.ru", 234651, 8000, (byte) 40);
- mas[3] = new Employee("SidorovAA", "seller", "SidorovAA@mail.ru", 654321, 7000, (byte) 45);
- mas[4] = new Employee("AbramovichRO", "businessman", "AbramovichRO@mail.ru", 112233, 100000, (byte) 50);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement