⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 answerhistorydata.java

📁 老外的在线考试
💻 JAVA
字号:
/* * SchoolEJB - CyberDemia's library of EJBs for educational related services. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. *  * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA  02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.school;import java.io.Serializable;import java.util.Date;/** * AnswerHistoryData is a data transfer object to transfer AnswerHistoryRecordBean data to clients. *  * @author Alexander Yap * @version $Revision: 1.4 $ at $Date: 2004/06/19 13:33:35 $ by $Author: alexycyap $ */public class AnswerHistoryData implements Serializable{	/**	 * Creates an instance of AnswerHistoryData.	 * @param testId Test ID	 * @param questionId Question ID	 * @param userId User ID	 * @param questionType Question type.	 * @param questionIndex Index of the question within the test.	 * @param questionScore Question score	 * @param userAnswer User's answer index	 * @param correctAnswer Question's correct answer index	 * @param correct Whether the user's answer was correct	 * @param userScore Score awarded to the user for this question.	 * @param timestamp Timestamp when the user answered the question.	 */	public AnswerHistoryData( 		Integer testId,		Integer questionId,		Integer userId,		Integer questionType,		int questionIndex,		int questionScore,		String userAnswer,		String correctAnswer,		boolean correct,		int userScore,		Date timestamp )	{		m_testId = testId;		m_questionId = questionId;		m_userId = userId;		m_questionType = questionType;		m_questionIndex = questionIndex;		m_questionScore = questionScore;		m_userAnswer = userAnswer;		m_correctAnswer = correctAnswer;		m_correct = correct;		m_userScore = userScore;		m_timestamp = timestamp;	}		/**	 * Gets the test ID.	 * @return Test ID	 */	public Integer getTestId()	{		return m_testId;	}		/**	 * Gets the question ID.	 * @return Question ID	 */	public Integer getQuestionId()	{		return m_questionId;	}		/**	 * Gets the user ID.	 * @return User ID	 */	public Integer getUserId()	{		return m_userId;	}		/**	 * Gets the index of the question within the test.	 * @return Index of the question.	 */	public int getQuestionIndex()	{		return m_questionIndex;	}		/**	 * Gets the score of the question. This is the score awarded to the	 * user if the user's answer is correct.	 * @return Question score.	 */	public int getQuestionScore()	{		return m_questionScore;	}		/**	 * Gets the score actually awarded to the user for this question.	 * May be 0, questionScore or a fraction of the questionScore depending 	 * the question type.	 * @return Awarded score.	 */	public int getUserScore()	{		return m_userScore;	}		/**	 * Gets the question type. 	 * @return Question type.	 * @see QuestionBean#getType()	 */	public Integer getQuestionType()	{		return m_questionType;	}		/**	 * Gets the user's answer.	 * @return User's answer.	 */	public String getUserAnswer()	{		return m_userAnswer;	}		/**	 * Gets the correct answer.	 * @return Correct answer.	 */	public String getCorrectAnswer()	{		return m_correctAnswer;	}		/**	 * Checks whether the user's answer was correct.	 * @return true if user's answer was correct, otherwise false.	 */	public boolean isCorrect()	{		return m_correct;	}		/**	 * Gets the timestamp when the user answered the question.	 * @return Timestamp when the user answered the question.	 */	public Date getTimestamp()	{		return m_timestamp;	}		private Integer m_testId = null;	private Integer m_questionId = null;	private Integer m_userId = null;	private Integer m_questionType = null;	private int m_questionIndex = -1;	private int m_questionScore = -1;	private int m_userScore = -1;	private String m_userAnswer = null;	private String m_correctAnswer = null;	private boolean m_correct = false;	private Date m_timestamp = null;	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -