University of Toronto -- Department of Computer Science CSC 108F - Fall 1998 Midterm test (Bellantoni's 1pm section) Aids allowed: Textbook only. Time: 50 minutes 1. [10 marks] Complete the Java program begun below. It is intended to read one line of input and print every other character, starting with the first character. If the line contains no characters, the program prints nothing. Here is an example of input and the corresponding output: input: Hello, Mary output: Hlo ay And now, the program that you must complete: public class HalfTheCharacters { public static void main (String[] args) throws IOException { BufferedReader in = new BufferedReader (new InputStreamReader (System.in),1); // You write the rest. Don't forget the "}"s ! String line = in.readLine(); for (int i=0; i mostKidsPerson.howManyChildren()) { mostKidsPerson = p2; } if (p3.howManyChildren() > mostKidsPerson.howManyChildren()) { mostKidsPerson = p3; } System.out.println(mostKidsPerson.getName()); } }