多項選擇題

public class Team extends java.util.LinkedList { 
public void addPlayer(Player p) { 
add(p); 
} 
public void compete(Team opponent) { /* more code here */ } 
} 
class Player { /* more code here */ } 
Which two are true?()

A. This code will compile.
B. This code demonstrates proper design of an is-a relationship.
C. This code demonstrates proper design of a has-a relationship.
D. A Java programmer using the Team class could remove Player objects from a Team object.

題目列表

你可能感興趣的試題

微信掃碼免費搜題