@@ -0,0 +1,1214 @@
+import java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Scanner;%0A%0Aclass Person implements Comparable%3CPerson%3E %7B%0A    private String name;%0A    private int age;%0A%0A    public Person(String name, int age) %7B%0A        this.name = name;%0A        this.age = age;%0A    %7D%0A%0A    public String getName() %7B%0A        return this.name;%0A    %7D%0A%0A    public int getAge() %7B%0A        return this.age;%0A    %7D%0A%0A    @Override%0A    public int compareTo(Person p) %7B%0A        return this.getName().compareTo(p.getName());%0A    %7D%0A%7D%0A%0Apublic class OpinionPoll %7B%0A    public static void main(String%5B%5D args) %7B%0A        Scanner scanner = new Scanner(System.in);%0A        Person person;%0A        List%3CPerson%3E personList = new ArrayList%3C%3E();%0A        int n = Integer.parseInt(scanner.nextLine());%0A%0A        for (int i = 0; i %3C n; i++) %7B%0A            String%5B%5D input = scanner.nextLine().split(%22 %22);%0A            String name = input%5B0%5D;%0A            int age = Integer.parseInt(input%5B1%5D);%0A            person = new Person(name,age);%0A%0A            if (person.getAge() %3E 30) %7B%0A                personList.add(person);%0A            %7D%0A        %7D%0A        %0A        personList.stream().sorted().forEach(p -%3E System.out.printf(%22%25s - %25d%25n%22, p.getName(), p.getAge()));%0A    %7D%0A%7D%0A

Create 03.OpinionPoll.java