Supply a class Person that implements the Comparable interface. Compare persons by their names. Ask the user to input 10 names and generate 10 Person objects. Using the compareTo method, determine the first and last person among them and print them.

Complete the following files:

Person.java

PersonDemo.java

import java.util.Scanner; import java.util.Arrays; /** This class tests the Person class. */ public class PersonDemo { public static void main(String[] args) { int count = 0; Scanner in = new Scanner(System.in); boolean more = true; Person first = null; Person last = null; while (more) { System.out.println("Please enter the person's name or a blank line to quit"); String name = in.nextLine(); if (name.equals("")) more = false; else { Person p = new Person(name); . . . // call first.compareTo(p), last.compareTo(p) . . . } } System.out.println("First: " + first); System.out.println("Last: " + last); } }