QuestionAnswerTool

QuestionAnswerTool - /* / QuestionAnswerTool.java Author:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // QuestionAnswerTool.java Author: Lewis/Loftus // // Tool for maintaining a list of questions submitted by an audience // and answered by a speaker or panel. //******************************************************************** / import java.util.Scanner; import java.util.Iterator; import java.util.LinkedList; i public class QuestionAnswerTool { //---------------------------------------------------------------- // List of unanswered questions //---------------------------------------------------------------- private LinkedList unanswered = null; //---------------------------------------------------------------- // List of answered questions //---------------------------------------------------------------- private LinkedList answered = null; //---------------------------------------------------------------- // Class describing a question //---------------------------------------------------------------- private class Question { //------------------------------------------------------------ // The question text //------------------------------------------------------------ private String question = null; p //------------------------------------------------------------ // The submitter's name //------------------------------------------------------------ private String name = null; p //------------------------------------------------------------ // The answer text //------------------------------------------------------------ private String answer = null; p public Question(String question, String name) { this.question = question; this.name = name; } public String getQuestion() { return question; } public String getSubmitterName() { return name; } public String getAnswer() { return answer; } public void setAnswer(String answer) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
this.answer = answer;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

QuestionAnswerTool - /* / QuestionAnswerTool.java Author:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online