SDSU CS 535 Object-Oriented Programming
Fall Semester, 2003
Assignment 6 Milestone
    Assignment Index        
© 2003, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 05-Dec-03

Assignment 6 Milestone

Carrot: If you get the following functionality done by class Tuesday and turn in hard copy. I will provide feedback (but no grades) to you by Thursday’s class

Implement your Question class(es) and provide it(them) with the following functionality.

1. A class method whose argument is a string defining the question and its options and return the question object. For example:

questionString := 
‘q=+Which country are you from?
a=USA
a=China
a=India
a=Sweden
a=Bulgaria
a=Russia’.
question := Question from: questionString.

The name of the class and method are used just for illustration. You may use any names for your classes and methods.

2. Add a user response to the question. That is what the user selected in a survey. The response will be an ordered collection of strings. The strings will be the options (countries) the user selected in the survey. For example:

response := #( ‘USA’ ‘Bulgaria’ ) asOrderedCollection.
question addResponse: response.

The name themethod is just for illustration. You may use any name for your method.

3. Generate the html for the question as it will be shown in a survey.

4. Generate the html for the question showing the number of times the each option (country) has been selected.

The
Copyright ©, All rights reserved.
2003 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.

    visitors since 05-Dec-03