Advertisement
Guest User

Increase Salary Main

a guest
Jun 18th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. package _002SalaryIncrease;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6. import java.util.ArrayList;
  7. import java.util.List;
  8.  
  9. /**
  10. * Created by IntelliJ IDEA.
  11. * User: LAPD
  12. * Date: 18.6.2018 г.
  13. * Time: 09:12 ч.
  14. */
  15. public class Main {
  16. public static void main(String[] args) throws IOException {
  17. BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  18. int n = Integer.parseInt(reader.readLine());
  19.  
  20. List<Person> people = new ArrayList<>();
  21.  
  22. for (int i = 0; i < n; i++) {
  23. String[] input = reader.readLine().split(" ");
  24. people.add(new Person(input[0], input[1],
  25. Integer.parseInt(input[2]),
  26. Double.parseDouble(input[3])));
  27. }
  28.  
  29. double bonus = Double.parseDouble(reader.readLine());
  30. for (Person person : people) {
  31. person.increaseSalary(bonus);
  32. System.out.println(person.toString());
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement