Конструктор класса Constructor with parameters, class methods with parameters / without void method

Опубликовано: 08 Январь 2026
на канале: Serhii Il
55
1

The task
9:10 - Create a constructor with parameters.
Create an Employee class with fields: name, position, pay,
and how many months an employee has been working in the company.
Create a method to initialize fields name and how much it works.
Using the new method, establish the position and pay of an employee
depending on the length of work. Add a method of type String with the
int parameter that returns information about the employee, as well as
the pay that he received for i months (the value is passed as a
parameter). Add a method that displays information whether the employee
can be a mentor depending on the position.
Create a constructor with parameters. switch / case , if / else , ||

Задание
9:10 - Создать конструктор с параметрами.
Создать класс Работник с полями: имя, должность, зарплата и сколько
месяцев работник работает в компании. Создать метод для инициализации полей имя и сколько работает. С помощью нового метода установить должность и зарплату работника в зависимости от длительность работы.
Добавить метод тип String с параметром int который возвращает информацию о сотруднике, а так же зарплату которую он получил за i месяцев (значение передается в качестве параметра). Добавить метод который выводит информацию может ли сотрудник быть наставником в зависимости от должности.
Создать конструктор с параметрами. switch / case , if / else , ||

Java Developer Android Studio.
Язык программирования Джава, Андроид Студио.


Repeat after me, then delete and write the code from memory. Create a new task and write the program yourself.
Повтори за мной, затем удали и напиши код по памяти. Придумай новое задание и напиши программу самостоятельно.


Thank you for watching
Спасибо за просмотр