edu.rit.survey
Class Survey

java.lang.Object
  extended by edu.rit.survey.Survey
All Implemented Interfaces:
SurveyRef, SurveyUIListener

public class Survey
extends Object
implements SurveyRef, SurveyUIListener

Class Survey is the Online Survey application, an ad hoc collaborative application using M2MI.

Usage: java edu.rit.survey.Survey

When running the Online Survey application, M2MI and M2MP must be configured, and the M2MP Daemon must be running if necessary. See packages edu.rit.m2mi and edu.rit.m2mp for further information.

The Online Survey application displays this UI:

The drop-down list has all the surveys that are out there. Pick one from the list, or click the "New..." button to create a new survey. The survey question and answers are displayed below, along with the number of votes for each answer. To vote for a certain answer, click the corresponding button.


Method Summary
static void main(String[] args)
          Main program.
 void newSurvey()
          Report that the user wants to create a new survey.
 void reportSurvey(SurveyState theSurveyState)
          Report the state of a survey.
 void run(String[] args)
          Run this Online Survey application.
 void setSurvey(int i)
          Report that the user selected the given survey.
 void setVote(int i)
          Report that the user voted for the given answer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run(String[] args)
         throws Throwable
Run this Online Survey application.

Throws:
Throwable

reportSurvey

public void reportSurvey(SurveyState theSurveyState)
Report the state of a survey.

Specified by:
reportSurvey in interface SurveyRef
Parameters:
theSurveyState - Survey state.

newSurvey

public void newSurvey()
Report that the user wants to create a new survey.

Specified by:
newSurvey in interface SurveyUIListener

setSurvey

public void setSurvey(int i)
Report that the user selected the given survey.

Specified by:
setSurvey in interface SurveyUIListener
Parameters:
i - Survey index.

setVote

public void setVote(int i)
Report that the user voted for the given answer.

Specified by:
setVote in interface SurveyUIListener
Parameters:
i - Answer index (0-3).

main

public static void main(String[] args)
                 throws Throwable
Main program.

Throws:
Throwable


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.