Pop Quiz 2-8-2008
Name__________________________

Questions 1-3 refer to this method declaration:


public String foo(Team theTeam, Counter score){
    String s;
    s = theTeam.getName() + ": " + score.getCount();
    return s;
}


Recall that "Election" + 2008 is "Election2008".
Recall that the getCount() method returns the count of a Counter
Recall that the getName() method returns the name of a Team
Suppose we have a Team named cowboys and a Counter named cowboyScore

1) Which of the following calls would compile?
A. foo(Team, Counter);
B. foo("Giants");
C. foo(cowboys, new Counter());
D. foo(cowboyScore, cowboys);

2) What does the method foo() give back?
A. A Team
B. A Counter
C. A String
D. Nothing

3) Which of the following is the best description of foo?
A. It prints a Team  a Counter and it prints them both to the console with a colon.
B. It takes a String and a Team and returns a Counter based on them
C. It gives back a String that has the Team's name, a colon, and score.
D. It takes a Team and gives them

4) What is the answer to this in Java 7 / 4?  Hint: this is straight out of the book.