?? quiz.java
字號:
package quiz;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;
import java.util.TreeMap;
public class Quiz {
private String name;
private Map questions = new TreeMap();
public Quiz(String name) {
this.name = name;
}
/**
* Returns the name of the quiz.
* @return
*/
public String getName() {
return name;
}
/**
* @param titel
* @param text
* @param order
* @return
*/
public Question createQuestion(String titel, String text, int order) {
Question q = new Question(titel, text, order);
questions.put(titel, q);
return q;
}
/**
* @return
*/
public Collection getQuestions() {
LinkedList ld = new LinkedList(questions.values());
Collections.sort(ld);
return ld;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -