Page 607 - AP Computer Science A, 7th edition
P. 607

Which of the following is equal to 2AFhex? (A) 27dec
(B) 300dec
(C) 687dec
(D) 4002dec (E) 6896dec
Ques t ions 35– 37 ref er t o t he TennisPlayer, GoodPlayer, and WeakPlayer classes below. These classes are to be used in a program to simulate a game of tennis.
public abstract class TennisPlayer {
private String name;
public TennisPlayer(String aName) { name = aName; }
public String getName() { return name; }
public abstract boolean serve();
public abstract boolean serviceReturn(); }
public class GoodPlayer extends TennisPlayer {
public GoodPlayer(String aName)
{ /∗ implementation not shown ∗/ }
/∗∗ @return true if serve is in (80% probability), ∗ false if serve is out (20% probability)
∗/
public boolean serve()
{ /∗ implementation not shown ∗/ }
/∗∗ @return true if service return is in (70% probability),
∗ false if service return is out (30% probability)















































































   605   606   607   608   609