/*
 * Copyright (c) 2005 Absolutely Training Limited
 * 
 * Created on 01-Dec-2005
 */
/**
 * Translation of the Java Answer class into JavaScript
 * 
 * @author paulb
 */
function Answer( props ) {

 	this.id = null;
	this.answerText = null;
	this.explanation = null;
	this.alwaysPresent = false;
	this.correct = false;
	
	for ( var p in props ) {
		this[p] = props[p];
	}
}

Answer.prototype.copy = function() {
	return new Answer( this );
};

Answer.prototype.getId = function() {
	return this.id;
};

Answer.prototype.isAlwaysPresent = function() {
	return this.alwaysPresent;
};

Answer.prototype.getAnswerText = function() {
	return this.answerText;
};

Answer.prototype.isCorrect = function() {
	return this.correct;
};

Answer.prototype.getExplanation = function() {
	return this.explanation;
};

Answer.prototype.toString = function() {
	return "Name: " + this.name + " Description: " + this.description +
			" Answer Text: " + this.answerText + " Explanation: " +
			this.explanation;
};

