Question: You are to write a simple, single-class program that uses an ArrayList collection. Below is a list of the US Presidents (last name only). Write


You are to write a simple, single-class program that uses an ArrayList collection. Below is a list of the US Presidents (last name only). Write a class called PresidentList. It should have: A member (data element) which is an ArrayList of Strings; A constructor that initializes the ArrayList to the Presidents' last names (use the constructor I have provided for you below in mine, the ArrayList member is called presidents); A method to write out the list of presidents to the console window (make it as simple as possible) A method to sort the list in alphabetical order A method to return the number of names in the list A method to return the number of presidents with any specific name (so if I call it with "Jones" it will return 0, if I call it with "Bush" it will return 2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
