Assignment 3 - Same as Assignment 2 except this time use an ArrayList to hold names
When you are sorting you are going to have to use the set member function of the ArrayList
import javax.swing.JOptionPane;
import java.io.*;
public class WindowTest {
public static input in = new input();
public static void sort(String [] ar, int ct)
{
}
public static void print(String [] ar, int ct)
{
}
public static void main( String[] args ) throws IOException
{
ArrayList arr = new ArrayList();
String s = "";
String na="";
while (! na.equals("End"))
{System.out.println("Enter a name or End");
na = in.getString();
if (! na.equals("End"))
{ar.add(na);
}
}
sort(ar);
print(ar);
System.exit( 0 );
}
}