Добавить метод с параметром int, тип возвращаемого значения - String,
public class Main {
    public static void main(String[] args) {
        Employee employee = new Employee("Ivan", "Tractorist", 10000, 4);
        System.out.println(employee.info(5));
    }
}
public class Employee {
    String name;
    String position;
    int theSalary;
    int s;
    public Employee(String name, String position, int theSalary, int s) {
        this.name = name;
        this.position = position;
        this.theSalary = theSalary;
        this.s = s;
    }
    String info(int i) {
        s = i * theSalary;
        return "Имя " + name + "\n должность " + position + "\n зарплата " + theSalary;
    }
}
Создал конструктор, с 3 параметрами: имя,должность, зарплата. Потом создал метод String с параметром int i. Не могу понять как подсчитать зарплату за n месяцев. Кто может помогите.
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 