?? paper.java
字號:
package exam.model;
import java.io.Serializable;
/**
* 代表一套試卷
* @author teacher
*
*/
public class Paper implements Serializable{
private static final long serialVersionUID = 0x123457;
private String name;
private Question[] questions;
private char[] answerSheet;
public Paper(String name,Question[] questions){
this.name = name;
this.questions = questions;
answerSheet = new char[questions.length];
for(int i=0;i<questions.length;i++){
answerSheet[i] = '#';
}
}
public void setAnswerSheet(int num,char c){
answerSheet[num] = c;
}
public char[] getAnswerSheet(){
return answerSheet;
}
public Question[] getQuestions(){
return questions;
}
public String getName(){
return this.name;
}
public String toString(){
String str = "";
for(int i = 0;i<questions.length;i++){
str += questions[i] + "\n";
}
return str;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -