/******************************************************************************************************/ /* Lyn K. Finman */ /* CS 576 */ /* Assignment 4 */ /* Motif w/ sockets */ /* */ /* The following is an implementation of a simple survey tool. */ /* */ /* Usage: survey [time] [host port] */ /* */ /* The program creates a "professor interface" by typing survey [time], where time indicates how */ /* long the survey should run. The professor is allowed to type a */ /* question and hit the Send button. The question will then appear on each of the student */ /* interfaces. */ /* */ /* A student joins the survey by typing survey [host port], where the host & port are provided */ /* by the professor. The survey timer is not started until the professor sends a question. */ /* Each student is allowed to select Yes or No as their response, then Send to submit their answer. */ /* */ /* The professor's display shows the number of students currently connected, and a count of the */ /* Yes and No responses. When the survey timer runs out, the student displays are updated with */ /* the number of yes/no responses received, and the number of students that entered the survey. */ /* */ /* It should be noted that each participant is allowed only one send - the Send button is disabled */ /* after it has been pressed. A student is allowed to quit without voting, but the professor */ /* cannot quit until survey time has elapsed. */ /* */ /* */ /* A resource file (Survey) is also provided. */ /* To build the program: make survey */ /* */ /******************************************************************************************************/