serverinfo.java
来自「抢答器」· Java 代码 · 共 133 行
JAVA
133 行
/*将初始化数据打包到ServerInfo类*/
public class ServerInfo
{
/*初始化数据的变量声明*/
private String title;
private int rightAddScore;
private int wrongSubScore;
private int faultSubScore;
private int initScore;
private int questionNumber;
private int answerTime;
public String getTitle()
{
return title;
}
public int setTitle(String title)
{
if(title!= null)
{
this.title = title;
return 0 ;
}
else
{
return -1;
}
}
public int getRightAddScore()
{
return rightAddScore;
}
public int setRightAddScore(String rightAddScore)throws NumberFormatException
{
if(rightAddScore!=null)
{
this.rightAddScore = Integer.parseInt(rightAddScore);
return 0;
}
else
{
return -1;
}
}
public int getWrongSubScore()
{
return wrongSubScore;
}
public int setWrongSubScore(String wrongSubScore)throws NumberFormatException
{
if(wrongSubScore!=null)
{
this.wrongSubScore = Integer.parseInt(wrongSubScore);
return 0;
}
else
{
return -1;
}
}
public int getFaultSubScore()
{
return faultSubScore;
}
public int setFaultSubScore(String faultSubScore)throws NumberFormatException
{
if(faultSubScore!=null)
{
this.faultSubScore =Integer.parseInt(faultSubScore);
return 0;
}
else
{
return -1;
}
}
public int getInitScore()
{
return initScore;
}
public int setInitScore(String initScore)throws NumberFormatException
{
if(initScore!=null)
{
this.initScore = Integer.parseInt(initScore);
return 0;
}
else
{
return -1;
}
}
public int getQuestionNumber()
{
return questionNumber;
}
public int setQuestionNumber(String questionNumber)throws NumberFormatException
{
if(questionNumber!=null)
{
this.questionNumber= Integer.parseInt(questionNumber);
return 0;
}
else
{
return -1;
}
}
public int getAnswerTime()
{
return answerTime;
}
public int setAnswerTime(String answerTime)throws NumberFormatException
{
if(answerTime!=null)
{
this.answerTime= Integer.parseInt(answerTime);
return 0;
}
else
{
return -1;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?