import java.util.ArrayList;
import java.util.Scanner;

public class Students {

	public static void main(String[] args) {
		// main program
		
		//initialize a new ArrayList of Strings
		ArrayList<String> students = new ArrayList<String>();
		
		//add students to the list
		appendStudents(students);
		
		//display the current student list
		displayStudents(students);
		
		//remove all students named "Joe"
		int count = removeStudents(students, "Joe");
		System.out.println(count+" students removed!");
		
		//display the current student list
		displayStudents(students);
	}
	
public static void appendStudents(ArrayList<String> s) {
	
	//create a Scanner variable for keyboard input
	Scanner kbin = new Scanner(System.in);
			
	//variable to store user input
	String name; 
			
	System.out.println("Enter search name, or quit: ");
	name = kbin.next();
			
	while(!name.equals("quit")){
		//use the add method to add Strings to the arraylist	
		s.add(name);
				
		//get the next name from the user
		System.out.println("Enter search name, or quit: ");
		name = kbin.next();
				
		}
}

public static void displayStudents(ArrayList<String> s) {
	
	for(int i = 0; i<s.size(); i++) {
		System.out.println(s.get(i));
	}
}

public static int removeStudents(ArrayList<String> s, String student) {
	//a dummy return. Your code will replace this
	return 1;
}


}
