Question About Rating Scale (Likert)

I am building quiz survey slides where users answer survey
questions, and the results are compared against scores of top rated
users. In the process of building the slides, I am not seeing any
dialog box where I can enter the correct answer against the quiz
taker's, and when I test the quiz for results, the quiz taker is
always right. I see there is a review area box on the stage, and
when I double-click on it for its properties, there are options for
an incorrect answer where the right answer should be listed. How
come it doesn't pop up when I enter an incorrect answer in the
preview? Any info would be greatly appreciated.

The rating scale can't support multiple selections per row. You would have to use the multiple choice field (though its not a table layout).
We do support multiple fields on one line now. This post explains:
http://forums.adobe.com/thread/1144130
Randy

Similar Messages

  • Rating Scale:  Likert Question

    Hi
    I've been able to change the options available, and even delete options I don't want included in the scale.
    Why does a number appear in the scale?
    E.G.  My options are:
    Most prefer
    Somewhat prefer
    Neutral
    But when I look at the quiz slide, it's become:
    1. Most prefer
    2. Somewhat prefer
    3. Neutral
    I don't want the numbers at all, or if I need it for scoring in the LMS, I don't want the numbers displayed on the slide.  I can't see where to turn this off or on.
    Can someone help?
    Thanks
    Anita

    The rating scale can't support multiple selections per row. You would have to use the multiple choice field (though its not a table layout).
    We do support multiple fields on one line now. This post explains:
    http://forums.adobe.com/thread/1144130
    Randy

  • View rating scale (Likert) responses

    Hello all,
    I'm trying to add a rating scale to a Captivate 3 project and have the results emailed to me.  My problem is I cannot figure out how to have the actual responses sent.  When I set it up, the email created only has the following (note: the numbers on the second line are all "0", not "U"):
    There are only two questions in the survey and in this example I answered the first as "2" and the other as "5".
    Does anyone know how to have the results emailed?
    Thanks,
    Matt

    Hi there
    Wow, most folks pop in to ask about one feature that doesn't seem to work as advertised. But you have a double feature! Kudos.
    Please review the link below. I believe both of your questions are answered there.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Question about rating +17

    I have a social networking app that has been rated with +17 (could have been eventually even my error) which includes push notifications. We have no mature/suggestive themes certainly and I was wondering if someone knows why the app possibly has been rated +17. I have received no answer from apple still and would be grateful if someone knows how I can find someone to help.

    It is difficult to answer this question because you can't really tell unless you are in the process of submitting an app. If I recall correctly, the last time I submitted one, it clearly says what rating your app is going to have with the settings you have provided. I also seem to recall that the questions that drive what rating your app will receive seem to have nothing whatsoever do with objectionable material or mature themes. I seem to remember it being about parental control and how much access you wanted the app to have.
    I suggest you ask your question in the developer forums because more people there are actively in the process of submitting apps and can give you more specific information.

  • Rating Scale (Likeart) question slide

    Hello cp experts!
    I wish to use the Question slide 'Rating Scale (likert)' at the end on the presentation to provide a feedback.
    Is it possible to report the student selection to LMS and view statistics over time? if so, how do I do that?
    I didn't manage to make this work....
    your help is much appreciated.

    If your LMS is truly SCORM-compliant, you should be able to track the Likert questions. Be sure to choose 'completed/incomplete' in the SCORM setup, not pass/fail, since there's no score associated with such questions.
    The ability to report on those results and see any trends is, as others have said, completely dependent on your LMS capabilities and features.

  • Add new rating scale text filed in SharePoint 2010 Survey List???

    Would it be possible to add extra text range field in SharePoint survey Rating Scale filed? so far i know it could be achieved by using Client Java script.  i have added following script in NewForm.aspx, EditForm.aspx, DispForm.aspx and Summary.aspx
    but nothing its reflecting into the UI page. Another problem is if i have multiple Questions with rating scale field, how i am gonna achieve extra text range for each question in one page/separator page like the following way?
    VeryDissatisfied          Dissatisfied     not satisfied    Satisfied    Very Satisfied   Do not participate
            1                           2                      3                
    4                   5                     6
    These JavaScript codes are all added in the content tag which contentplaceholderid="PlaceHolderMain". should i add this script to another location?
    For NewForm.aspx; DispForm.aspx; EditForm.aspx
    <script type="text/javascript">
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].summary == 'Rating Scale Question')
    var trs = tables[i].getElementsByTagName('tr'); 
    var tds = trs[0].getElementsByTagName('td'); 
    tds[2].colSpan = 1;
    tds[2].innerHTML = 'your range text';
    tds[3].colSpan = 1;
    tds[3].innerHTML = your range text';
    tds[4].colSpan = 1;
    tds[4].innerHTML = your range text';
    tds[5].colSpan = 1;
    tds[5].innerHTML = your range text'; 
    </script>
    For Summary.aspx
    <script type="text/javascript">
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].className == 'ms-surveyVBarT')
    tables[i].deleteRow(0);
    var row = tables[i].insertRow(0);
    var cell0 = row.insertCell(0);
    var cell1 = row.insertCell(1);
    var cell2 = row.insertCell(2);
    var cell3 = row.insertCell(3);
    cell0.innerHTML = your range text';
    cell1.innerHTML = your range text';
    cell2.innerHTML = your range text';
    cell3.innerHTML = your range text';
    </script>
    Thanks in advanced!

    Hi,
    According to your post, my understanding is that you wanted to Add new rating scale title fields in SharePoint Survey.
    I have done a test, it works fine. I have just added the function to load the code, refer to the following:
    For NewForm.aspx; DispForm.aspx; EditForm.aspx
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("ChangeTitle");
    function ChangeTitle() {
    var tables = document.getElementsByTagName('table');
    for (var i = 0; i < tables.length; i++) {
    if (tables[i].summary == 'Rating Scale Question') {
    var trs = tables[i].getElementsByTagName('tr');
    var tds = trs[0].getElementsByTagName('td');
    tds[2].colSpan = 1;
    tds[2].innerHTML = 'your range text';
    tds[3].colSpan = 1;
    tds[3].innerHTML = 'your range text';
    tds[4].colSpan = 1;
    tds[4].innerHTML = 'your range text';
    tds[5].colSpan = 1;
    tds[5].innerHTML = 'your range text';
    </script>
    For Summary.aspx
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("ChangeTitle");
    function ChangeTitle() {
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].summary == 'Rating Scale Question')
    var trs = tables[i].getElementsByTagName('tr');
    var tds = trs[0].getElementsByTagName('td');
    tds[2].colSpan = 1;
    tds[2].innerHTML = 'your range text';
    tds[3].colSpan = 1;
    tds[3].innerHTML = your range text';
    tds[4].colSpan = 1;
    tds[4].innerHTML = your range text';
    tds[5].colSpan = 1;
    tds[5].innerHTML = your range text';
    < /script>
    For Summary.aspx
    < script type="text/javascript">
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].className == 'ms-surveyVBarT')
    tables[i].deleteRow(0);
    var row = tables[i].insertRow(0);
    var cell0 = row.insertCell(0);
    var cell1 = row.insertCell(1);
    var cell2 = row.insertCell(2);
    var cell3 = row.insertCell(3);
    cell0.innerHTML = your range text';
    cell1.innerHTML = your range text';
    cell2.innerHTML = your range text';
    cell3.innerHTML = your range text';
    </script>
    Best Regards,
    Lisa Chen

  • Quiz - Rating scale (survey) Output

    Hello again guys
    This time i have some trouble with quizes in my project. I thought that it is easy to create survey quiz but...:)
    What (or where) is output from rating scale quiz slides?
    There are two rating scale slides in my project (each with 5 questions rated 1-5) but there is absolutely no output or output settings that alows me display user answers.
    Is it possible to somehow show total sum of points from survey questions?
    (captivate 5)
    Thx, Martin

    Well...
    its project for people to help them deal with stress.
    One part of whole project is this assignment:
    There are about 15 questions with 5 answers. Number of answer coresponds with points obtained.
    Example:
    A) "I usualy sleep 7-8 hours a day" : 1 ("almost always"), 2 ("often"), 3 ("it depends"), 4 ("almost never") to 5 ("never")
    B) "I am able to effectively organize my free time" : 1 ("almost always"), 2 ("often"), 3 ("it depends"), 4 ("almost never") to 5 ("never")
    .etc
    at the end i need to sum points from answers because there are 3 colums with some advices to help user deal with stress acording to total sum of points.
    20 – 39 ...blah blah you are fine
    40 – 59 ..blah blah get a puppy...
    60 – 85 ..blah blah go hang yourself.
    ..now personaly im somewhere between 95-100 points...

  • Questions about Contracts and New Phones

    I've had some questions about how upgrading and adding new lines to a contract works and I haven't been able to find the answers through Google. First some background information: We started this most recent contract in September of 2011 and as such the current contract will end September of 2013. According to the phone information portal, all three of the devices on my account will be eligible for an upgrade this Saturday (May 4th, 2013). My daughters birthday just so happens to coincide with that date and as such we were planning on surprising her by taking her to buy a new phone and we are going to allow our son to upgrade his phone as he has been asking to for a while.
    Is there any way of locking/limiting the amount of data allowed for each phone on a shared plan? I'm worried that my daughter will go way over our limit and not pay attention to the point where she will end up costing us a very large amount of money
    Does adding a new line require the start of a new contract?
    My son was interested in purchasing the "Samsung Galaxy S4" and has noticed that pre-orders for that phone are currently available. Is it possible to pre-order the phone on that date using the upgrade so that the price will be reduced?
    If the answer to number 2 is a no, does adding the new line take away the upgrades from other phones or would he be able to go to the store past the release date and upgrade then?
    Thanks for taking the time to read through all of this. Any help that I receive will be extremely appreciated.

    1. Yes. There is an additional fee per line you wish to do this for. When you add the line you can choose this option and set the data amount it is allowed to use.
    2. Yes. Each line is a separate contract with its own expiration date.
    3. The contract starts when you sign up for the contract. The amount will be pro-rated on the plan if it is not started until part-way through your billing cycle that is what you are asking. Doing the pre-order just guarantees you the phone in case they sell out.
    4. No it will not take any upgrades away as each line has its own termination date. You can move upgrades around between lines though.

  • Two questions about SG300 DHCP server

    Hi,
    I have two questions about the DHCP server on the SG300:
    On the Address Binding page, what does the "Declined" state mean? I have a NAS device that won't pull an address, and I think that the entry with a state of "Declined" corresponds to this device. It was previously pulling an address from a RV180, so the only difference is that it is now connected to the SG300. I worked around this by manually setting the address on the NAS device, but this won't scale if I run into a lot of other devices that can't pull an address.
    I configured a static address binding for a WAP321 and found that instead of pulling the configured address that it pulled a dynamic address. I checked the Address Binding page and see that the dynamic entry that corresponds with the WAP321 has a Client Identifier rather than a MAC address. I changed the static entry for the WAP321 to use the client identifier displayed in the dynamic entry, and now the WAP321 pulls the configured static address. Is this expected behavior?
    Thanks,
    Bob

    With the SX300/500 it is required the client identifier, it doesn't automatically insert it. If static DHCP is made on the switch and you didn't need client identifier, that is more or less fortunate behavior for you
    So to answer this question, the expected behavior is to configure client identifier for static DHCP entry.
    -Tom
    Please mark answered for helpful posts
    http://blogs.cisco.com/smallbusiness/

  • Rating scales

    How do I construct a rating scale with a statment (question) on the left hand side and the right hand side of the range i.e. two statements that I am asking people to evaluate and agree with

    You are right, we do not support that type of rating scale but you can add or vote on that as a feature ideahere:
    http://forums.adobe.com/community/formscentral?view=idea
    If you need to add a new idea click "Create an idea" under "Actions" in the top right.
    Thanks,
    Josh

  • Rating scale and text

    I am using the rating scale and want to include a text field for additional information.  Ideally I'd like the scale with the text field to the right but otherwise it could go underneath.  However, I don't want to have to keep repeating the scale.  Any ideas on whether this is possible or if there is a work around?

    Hi;
    I am guessing you would like to add additional information to each of the questions in your ratings scale right?  Assuming that is the case, we don't really have a work-around, I think you'd have to create a Rating Scale field followed by a multi-line text field and then copy and paste and modify that for each of your questions.  Let me know if I didn't understand fully and feel free to add a feature idea to our ideas page:
    http://forums.adobe.com/community/formscentral?view=idea
    If you need to add a new idea click "Create an idea" under "Actions" in the top right.
    Thanks,
    Josh

  • Rating Scale Results

    I would like to create a survey using rating scales.
    Q1: How do I get a page summing the results?
    Q2: Is it possible to have questions in categories and have the response to that question stored in that category.
    Example: 4 kinds of questions, 40 questions in total, all questions mixed.
    When a question from category 1 is answered, the result is stored in the results of category 1.
    Andrew

    Hello,
    No answer yet means normally that the question is not clear to many users? What is meant by 'summing the results'?
    Maybe I could help, but try to explain a little bit better. Have a look at:
    http://blog.lilybiri.com/graded-survey
    http://blog.lilybiri.com/intermediate-score-slides
    Those articles are not really explaining your use case, but somehow they are linked with what you want, that is just my intuition.

  • How to custom Rating Scale field to add more range text in survey on sharepoint 2013

    When we use the rating scale field to create question in survey. You can only set three range texts for each question. Is there any way to allocate a range text for each range ? Such as below :
                                     Low             Average        High       Excellent      
    Important
                                     1                  2                  3    
              4                     5
    I put extra 1 Rating Text Value / Excellent . but it does not show at respond to survey page.
    <Field Type="GridChoice" DisplayName="rating4" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" GridStartNum="1" GridEndNum="5" GridTxtRng1="Low" GridTxtRng2="Average"
    GridTxtRng3="High" GridTxtRng4="Excellent" GridNATxt="N/A" ID="{5259c17a-9260-4857-8594-f7dc28281763}" SourceID="{2712de13-4857-4225-b5bd-06697c96ad5b}" StaticName="rating4" Name="rating4"
    ColName="ntext2" RowOrdinal="0"><CHOICES><CHOICE>q</CHOICE><CHOICE>g</CHOICE><CHOICE>h</CHOICE></CHOICES></Field>
    <Field Type="GridChoice" DisplayName="rating4" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" GridStartNum="1" GridEndNum="5" GridTxtRng1="Low" GridTxtRng2="Average"
    GridTxtRng3="High" GridTxtRng4="Excellent" GridNATxt="N/A" ID="{5259c17a-9260-4857-8594-f7dc28281763}" SourceID="{2712de13-4857-4225-b5bd-06697c96ad5b}" StaticName="rating4" Name="rating4"
    ColName="ntext2" RowOrdinal="0"><CHOICES><CHOICE>q</CHOICE><CHOICE>g</CHOICE><CHOICE>h</CHOICE></CHOICES></Field> 
    Thanks all your help !

    Hi,
    From Microsoft official site, we can find the definition of “Range Text”: enter descriptions for the low, middle, and high scale. It means there are only
    three types of description which is the by design behavior. For example, if we have 8 number range, the purpose of the range text is to tell users that 8 is highest and 1 is the lowest. We don’t need to specific description for each column.
    As you really want to achieve the goal, we can write client JavaScript code to dynamically update the UI on page. We use SharePoint designer updates the “NewForm.aspx”,
    “DispForm.aspx”, “EditForm.aspx” and “Summary.aspx” to add custom JavaScript codes.
    For NewForm.aspx; DispForm.aspx; EditForm.aspx
    <script type="text/javascript">
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].summary == 'Rating Scale Question')
    var trs = tables[i].getElementsByTagName('tr');
    var tds = trs[0].getElementsByTagName('td');
    tds[2].colSpan = 1;
    tds[2].innerHTML = 'your range text';
    tds[3].colSpan = 1;
    tds[3].innerHTML = your range text';
    tds[4].colSpan = 1;
    tds[4].innerHTML = your range text';
    tds[5].colSpan = 1;
    tds[5].innerHTML = your range text';
    </script>
    For Summary.aspx
    <script type="text/javascript">
    var tables = document.getElementsByTagName('table');
    for (var i=0; i<tables.length; i++)
    if (tables[i].className == 'ms-surveyVBarT')
    tables[i].deleteRow(0);
    var row = tables[i].insertRow(0);
    var cell0 = row.insertCell(0);
    var cell1 = row.insertCell(1);
    var cell2 = row.insertCell(2);
    var cell3 = row.insertCell(3);
    cell0.innerHTML = your range text';
    cell1.innerHTML = your range text';
    cell2.innerHTML = your range text';
    cell3.innerHTML = your range text';
    </script>
    These JavaScript codes are all added in the content tag which contentplaceholderid="PlaceHolderMain".
    Hope it helps.
    Xue-Mei Chang

  • Questions about a MasterQuize program

    Hi, everyone.
    I got a in-class case study program like this in the class:
    * This class stores/represents a question that has one of two
    * answers: True or False.
    * <p></p>
    * It needs to track the following information:
    * <ul>
    * <li>Question text</li>
    * <li>Correct answer</li>
    * <li>The user's answer to the question</li>
    * <li>Points value</li>
    * <li>Category</li>
    * <li>Difficulty rating</li>
    * </ul>
    // Our question should allow us to do the following:
    // - Create question (constructor) -- may be overloaded
    // - Print (display) question
    // - Check client's answer for correctness
    // - Get points value for question (0 or max)
    //   - Add "No-BS" grading option
    // - Getting client's answer
    // - Check to see if answered by client
    public class TrueFalseQuestion
        // Class constants (to simplify changes to common values)
        public static final int MIN_DIFFICULTY_LEVEL = 1;
        public static final int MAX_DIFFICULTY_LEVEL = 5;
        public static final int DEFAULT_DIFFICULTY_LEVEL = 1;
        public static final int DEFAULT_POINT_VALUE = 1;
        public static final String DEFAULT_CATEGORY_VALUE = "none";
        // Class instance variables
        private String questionText;
        private String correctAnswer;
        private String userAnswer;
        private int pointsValue;
        private String category;
        private int difficultyLevel; // TODO: Set a range for difficulty levels
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * @param pts The total points available for this question
         * @param ctgry Category keyword for this question
         * @param level The perceived/intended difficulty level of this question
         * <p></p>
         * Defines a TrueFalseQuestion object.
        public TrueFalseQuestion (String text, String answer, int pts, String ctgry, int level)
            // Set starting values for all instance variables
            questionText = text.trim();
            correctAnswer = answer.trim();
            userAnswer = null; // No user answer supplied yet
            if (pts >= 1) // We assume that every problem is worth at least 1 point
                pointsValue = pts;
            else
                pointsValue = DEFAULT_POINT_VALUE;
            category = ctgry.trim();
            if (level >= MIN_DIFFICULTY_LEVEL && level <= MAX_DIFFICULTY_LEVEL) // within range
                difficultyLevel = level;
            else
                difficultyLevel = DEFAULT_DIFFICULTY_LEVEL;
        // Simplified (overloaded) constructors
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * @param pts The total points available for this question
         * <p></p>
         * Defines a TrueFalseQuestion with default values for category and difficulty level.
        public TrueFalseQuestion (String text, String answer, int pts)
            // Call pre-existing constructor with default category and difficulty
            this(text, answer, pts, DEFAULT_CATEGORY_VALUE, DEFAULT_DIFFICULTY_LEVEL);
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * <p></p>
         * Defines a TrueFalseQuestion with the default point value, default category,
         * and default difficulty level.
        public TrueFalseQuestion (String text, String answer)
            // Call pre-existing constructor with default points, category and difficulty
            this(text, answer, DEFAULT_POINT_VALUE, DEFAULT_CATEGORY_VALUE,
                 DEFAULT_DIFFICULTY_LEVEL);
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * @param pts The total points available for this question
         * @param ctgry Category keyword for this question
         * <p></p>
         * Defines a TrueFalseQuestion with the default difficulty level.
        public TrueFalseQuestion (String text, String answer, int pts, String ctgry)
            // Call pre-existing constructor with default points, category and difficulty
            this(text, answer, pts, ctgry,
                 DEFAULT_DIFFICULTY_LEVEL);
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * @param ctgry Category keyword for this question
         * <p></p>
         * Defines a TrueFalseQuestion with the default point value and the default
         * difficulty level.
        public TrueFalseQuestion (String text, String answer, String ctgry)
            // Use default points and difficulty
            this(text, answer, DEFAULT_POINT_VALUE, ctgry, DEFAULT_DIFFICULTY_LEVEL);
         * @param text The literal wording of this question
         * @param answer The correct answer for this question
         * @param pts The total points available for this question
         * @param level The perceived/intended difficulty level of this question
         * <p></p>
         * Defines a TrueFalseQuestion with the default value for the question category.
        public TrueFalseQuestion (String text, String answer, int pts, int level)
            // Use default category
            this(text, answer, pts, DEFAULT_CATEGORY_VALUE, level);
        // Clients can invoke this method to retrieve the text of the current question.
        // We chose to return the text instead of printing it; this allows the client
        // to decide how it should be presented (via a GUI, over a network, etc.)
        public String getQuestion ()
            return questionText;
        // This method allows the client to store the user's answer inside the
        // TrueFalseQuestion object for easy comparison
        public void submitAnswer (String ans)
            userAnswer = ans;
        // This method reports whether the submitted answer matches the correct answer
        public boolean answerIsCorrect(String userAns) // This version does all the work
            if (userAns == null) // No response from user (yet)
                return false;
            else
                // Normalize and compare answers
                char key = normalize(correctAnswer); // Get 't' or 'f'
                char ans = normalize(userAns); // Get 't' or 'f'
                return (key == ans);
        public boolean answerIsCorrect ()
            return answerIsCorrect(userAnswer); // Call previously-defined version
        public int getPointsValue()
            return pointsValue;
        // Return the points awarded for the user's answer. This method does
        // NOT support partial credit; answers are either correct or incorrect.
        // If the "No-BS" option is selected, blank (unanswered) questions receive
        // 1 point automatically; otherwise, the score will be either 0 or the
        // question's normal points value.
        public int getPointsEarned(boolean useNoBSRule)
    System.out.println("useNoBS: " + useNoBSRule + "\tuserAnswer: " + userAnswer + "\tcorrectAnswer: " + correctAnswer);
            if (useNoBSRule && (userAnswer == null))
                return 1;
            else if (userAnswer == null)
                return 0; // Without "No-BS", treat blank problems as incorrect
            if (answerIsCorrect() == false)
                return 0;
            else
                return pointsValue;
        // This method returns true if the user has submitted an answer
        // for this question (regardless of whether that answer is correct)
        public boolean hasBeenAnswered ()
            return (userAnswer != null);
        // Private helper method to convert all answers to single lowercase
        // letters (in this case, 't' for TRUE and 'f' for FALSE)
        private char normalize (String input)
             if (input != null)
                  input = input.trim(); // Remove leading whitespace
                  input = input.toLowerCase();
                  return input.charAt(0);
             else
                  return ' ';
    import java.util.*;
    * This class represents a complete test or quiz.
    * Data stored:
    * - List of questions
    * - Total score earned
    * - Total score possible
    * - Name/title of test
    * - Instructions
    *  - Category/class assignment
    *  - Student (test-taker) name
    *  - Date test is/was taken
    *  - Time started
    *  - Time completed
    *  - Maximum time allotted
    *  - (List of) Maximum attempts per question
    *  - List of attempts per question
    *  - List of difficulty ratings per question
    *  - Assignment weight
    * Methods:
    * - Constructor
    * - Add question
    * - Display question
    * - Display test
    * - Display instructions
    *      - Generate random exam
    * - Take/administer test
    * - Get score
    * STUFF TO DO:
    * - Add time/date restrictions
    * - Add network access restrictions
    * - Add other restrictions/allowances?
    * @author (your name)
    * @version (a version number or a date)
    public class Test
        // Class constant
        public static final int MAX_NUMBER_OF_QUESTIONS = 10;
        // Class instance variables
        private String testName;
        private int scoreEarned; // What the student earned on the exam
        private int scorePossible; // Total point values of all questions
        private String instructions; // Exam header text
        private ArrayList<TrueFalseQuestion> questions; // Create inside constructor
        // Methods
        public Test (String name, String instr)
            testName = name;
            scoreEarned = 0;
            scorePossible = 0;
            instructions = instr;
            questions = new ArrayList<TrueFalseQuestion>(); //[MAX_NUMBER_OF_QUESTIONS];
        public String getInstructions()
            return instructions;
        public int getScore()
            return scoreEarned;
        public void addQuestion (TrueFalseQuestion q)
            scorePossible += q.getPointsValue();
            questions.add(q); // Automatically append question to end of test
        public String displayQuestion (int position)
            if (position < questions.size())
                return (position+1) + ". " + questions.get(position).getQuestion();
            else
                return null;
        public String displayTest ()
            String result = "";
            for (int i = 0; i < questions.size(); i++)
                result += (i+1) + ". (";
                TrueFalseQuestion t = questions.get(i);
                result += t.getPointsValue();
                result += " points)\n\n" + displayQuestion(i);
                result += "\n\n";
            return result;
        // Get test length (number of questions)
        public int length ()
             return questions.size();
        // Submit answer to a specific question
        public boolean answer(int number, String a)
             // Question numbers run from 0-(max-1) -- THIS WAS AN OFF-BY-ONE ERROR AT FIRST
             if (number >= 0 && number < questions.size())
                  TrueFalseQuestion t = questions.get(number);
                  t.submitAnswer(a);
                  return true; // Question was answered
             else
                  return false; // Unable to answer (nonexistent) question
        // Score exam
        public void scoreExam (boolean useNoBS)
             scoreEarned = 0;
             for (int i = 0; i < questions.size(); i++) // For each question in exam
                  TrueFalseQuestion t = questions.get(i); // get current question
                  scoreEarned += t.getPointsEarned(useNoBS);
    }// Test harness for the Test and *Question classes
    import java.util.*;
    public class QuizDriver
         public static void main(String[] args)
              // Create a new Test object
              Test exam = new Test("Sample Exam", "Select the correct answer for each question");
              setUp(exam);
              Scanner sc = new Scanner(System.in);
              System.out.println(exam.getInstructions());
              // Administer exam
              for (int i = 0; i < exam.length(); i++)
                   // Print out current question
                   System.out.println(exam.displayQuestion(i));
                   // Get user answer
                   System.out.print("Your answer: ");
                   String ans = sc.nextLine();
                   if (ans.equals("")) // Handle blank responses for unanswered questions
                        ans = null;
                   exam.answer(i, ans);
              // Get exam results
              exam.scoreExam(true);
              System.out.println("Your final score was " + exam.getScore() + " points.");
         private static void setUp (Test t)
              TrueFalseQuestion x = new TrueFalseQuestion("The sky is blue.", "true", 2);
              t.addQuestion(x);
              x = new TrueFalseQuestion("The first FORTRAN compiler debuted in 1957", "true", 5);
              t.addQuestion(x);
              x = new TrueFalseQuestion("Spock was a Vulcan", "false", 3);
              t.addQuestion(x);
    }This program is far from finishing.
    I have many questions about this program, but let me ask this one first:
    In the TrueFalseQeustion class, why are there so many constructors? What is the purpose of setting some of the variables to default values?
    Thank you very much!!!
    Edited by: Terry001 on Apr 16, 2008 10:02 AM

    newark wrote:
    Stop ignoring the error messages. You seem to think that an error message means you're doing the assignment wrong. It's probably a simple fix. Post the exact error messages, as well as the code that corresponds to them. The error message will tell you exactly what line the problem occurs on, so you know right where to look.Hi,
    After some modifications, the program now gives me the result the assignment wants when I run it. But I still have trouble with the MultipleChoiceQuestion class
    Here is the complete program
    QuizDriver class
    // Test harness for the Test and *Question classes
    import java.util.*;
    public class QuizDriver
         public static void main(String[] args)
              // Create a new Test object
              Test exam = new Test("Sample Exam", "Select the correct answer for each question");
              setUp(exam);
              Scanner sc = new Scanner(System.in);
              System.out.println(exam.getInstructions());
              // Administer exam
              for (int i = 0; i < exam.length(); i++)
                   // Print out current question
                   System.out.println(exam.displayQuestion(i));
                   // Get user answer
                   System.out.print("Your answer: ");
                   String ans = sc.nextLine();
                   if (ans.equals("")) // Handle blank responses for unanswered questions
                        ans = null;
                   exam.answer(i, ans);
              // Get exam results
              exam.scoreExam(true);
              System.out.println("Your final score was " + exam.getScore() + " points.");
         private static void setUp (Test t)
                                   Question x;
              x = new TrueFalseQuestion("The sky is blue.", "true", 2);
              t.addQuestion(x);
              x = new TrueFalseQuestion("The first FORTRAN compiler debuted in 1957", "true", 5);
              t.addQuestion(x);
              x = new TrueFalseQuestion("Spock was a Vulcan", "false", 3);
              t.addQuestion(x);
              x = new MultipleChoiceQuestion("What is the color of the car\na.Red\nb.Green", "a. Red", 3);
              t.addQuestion(x);
              x = new MultipleChoiceQuestion("What is the name of this class\na.CSE110\nb.CSE114", "b, CSE114", 3);
              t.addQuestion(x);
    }Test
    public class Test
        // Class constant
        public static final int MAX_NUMBER_OF_QUESTIONS = 10;
        // Class instance variables
        private String testName;
        private int scoreEarned; // What the student earned on the exam
        private int scorePossible; // Total point values of all questions
        private String instructions; // Exam header text
        private ArrayList<Question> questions; // Create inside constructor
        // Methods
        public Test (String name, String instr)
            testName = name;
            scoreEarned = 0;
            scorePossible = 0;
            instructions = instr;
            questions = new ArrayList<Question>(); //[MAX_NUMBER_OF_QUESTIONS];
        public String getInstructions()
            return instructions;
        public int getScore()
            return scoreEarned;
        public void addQuestion (Question q)
            scorePossible += q.getPointsValue();
            questions.add(q); // Automatically append question to end of test
        public String displayQuestion (int position)
            if (position < questions.size())
                return (position+1) + ". " + questions.get(position).getQuestion();
            else
                return null;
        public String displayTest ()
            String result = "";
            for (int i = 0; i < questions.size(); i++)
                result += (i+1) + ". (";
                Question t = questions.get(i);
                result += t.getPointsValue();
                result += " points)\n\n" + displayQuestion(i);
                result += "\n\n";
            return result;
        // Get test length (number of questions)
        public int length ()
             return questions.size();
        // Submit answer to a specific question
        public boolean answer(int number, String a)
             // Question numbers run from 0-(max-1) -- THIS WAS AN OFF-BY-ONE ERROR AT FIRST
             if (number >= 0 && number < questions.size())
                  Question t = questions.get(number);
                  t.submitAnswer(a);
                  return true; // Question was answered
             else
                  return false; // Unable to answer (nonexistent) question
        // Score exam
        public void scoreExam (boolean useNoBS)
             scoreEarned = 0;
             for (int i = 0; i < questions.size(); i++) // For each question in exam
                  Question t = questions.get(i); // get current question
                  scoreEarned += t.getPointsEarned(useNoBS);
    }Question
    public class Question
    // Class constants
      public static final int MIN_DIFFICULTY_LEVEL = 1;
      public static final int MAX_DIFFICULTY_LEVEL = 5;
      public static final int DEFAULT_DIFFICULTY_LEVEL = 1;
      public static final int DEFAULT_POINT_VALUE = 1;
      public static final String DEFAULT_CATEGORY_VALUE = "none";
      // Class instance variables
      protected String questionText;
      protected String correctAnswer;
      protected String userAnswer;
      protected int pointsValue;
      protected String category;
      protected int difficultyLevel; //TODO: set a range for difficulty levels
      // Constructors
      public Question (String text, String answer, int pts, String ctgry, int level)
          questionText = text.trim();
          correctAnswer = answer.trim();
          userAnswer = null;
          if (pts >= 1)
              pointsValue = pts;
            else
                pointsValue = DEFAULT_POINT_VALUE;
            category = ctgry.trim();
            if (level >= MIN_DIFFICULTY_LEVEL && level <= MAX_DIFFICULTY_LEVEL)
                difficultyLevel = level;
            else
                difficultyLevel = DEFAULT_DIFFICULTY_LEVEL;
        // Overloaded (simplied) constructors
        public Question (String text, String answer, int pts)
            this(text, answer, pts, DEFAULT_CATEGORY_VALUE, DEFAULT_DIFFICULTY_LEVEL);
        public Question (String text, String answer, int pts, String ctgry)
            this(text, answer, pts, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public Question (String text, String answer, String ctgry)
            this(text, answer, DEFAULT_POINT_VALUE, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public Question (String text, String answer, int pts, int level)
            this(text, answer, pts, DEFAULT_CATEGORY_VALUE, level);
        // Methods
        public String getQuestion ()
            return questionText;
        // Use this method to store user answers
        public void submitAnswer (String ans)
            userAnswer = ans;
        public boolean answerIsCorrect (String userAns)
            if (userAns == null)
                return false;
            else
                // Normalize and compare answers
                char key = normalize (correctAnswer); //Get the first letter of an answer
                char ans = normalize (userAns); //Get the first letter of an answer
                return (key == ans);
        public boolean answerIsCorrect ()// Why do we need two answerisCorrect() methods?
            return answerIsCorrect (userAnswer);
        public int getPointsValue ()
            return pointsValue;
        public int getPointsEarned (boolean userNoBSRule)
            System.out.println ("useNoBS: " + userNoBSRule + "\tuseAnswer: " + userAnswer + "\tcorrectAnswer: " + correctAnswer);
            if (userNoBSRule && (userAnswer == null))
                return 1;
            else if (userAnswer == null)
                return 0;
            if (answerIsCorrect() == false)
                return 0;
            else
                return pointsValue;
        public String getCorrectAnswer ()
            return correctAnswer;
        public boolean hasBeenAnswered ()
            return (userAnswer != null);
        private char normalize (String input)
            if (input != null)
                input = input.trim();
                input = input.toLowerCase();
                return input.charAt(0);
            else
                return ' ';
           TrueFalseQuestion
    public class TrueFalseQuestion extends Question
      public TrueFalseQuestion (String text, String answer, int pts, String ctgry, int level)
          super(text, answer, pts, ctgry, level);
        public TrueFalseQuestion (String text, String answer, int pts)
            super(text, answer, pts, DEFAULT_CATEGORY_VALUE, DEFAULT_DIFFICULTY_LEVEL);
        public TrueFalseQuestion (String text, String answer, int pts, String ctgry)
            super(text, answer, pts, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public TrueFalseQuestion (String text, String answer, String ctgry)
            super(text, answer, DEFAULT_POINT_VALUE, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public TrueFalseQuestion (String text, String answer, int pts, int level)
            super(text, answer, pts, DEFAULT_CATEGORY_VALUE, level);
        // Methods
        public String[] getPossibleAnswerChoice ()
            String[] possibleAnswerChoice = {"true", "false"};
            return possibleAnswerChoice;
    } MultipleChoiceQuestion
    public class MultipleChoiceQuestion extends Question
       public MultipleChoiceQuestion (String text, String answer, int pts, String ctgry, int level)
           super(text, answer, pts, ctgry, level);
        public MultipleChoiceQuestion (String text, String answer, int pts)
            super(text, answer, pts, DEFAULT_CATEGORY_VALUE, DEFAULT_DIFFICULTY_LEVEL);
        public MultipleChoiceQuestion (String text, String answer, int pts, String ctgry)
            super(text, answer, pts, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public MultipleChoiceQuestion (String text, String answer, String ctgry)
            super(text, answer, DEFAULT_POINT_VALUE, ctgry, DEFAULT_DIFFICULTY_LEVEL);
        public MultipleChoiceQuestion (String text, String answer, int pts, int level)
            super(text, answer, pts, DEFAULT_CATEGORY_VALUE, level);
        // Methods
        String possibleAnswers;
        public String getPossibleAnswers ()
            return possibleAnswers;
        public void addAnswerChoice (String answerChoice)
            String ansChoice = answerChoice;
            questionText += "\nansChoice";
            possibleAnswers = answerChoice;
        public void printAnswerChoice ()
            System.out.println (questionText);
    } I don't understand why the assignment wants me to build a method in the MultpleChoiceQuestion class to store the potential answer choices, I can make the program display the potential answer choices by including them in the questionText as following in the QuizDriver class
    Question x;
    x = new MultipleChoiceQuestion("What is the color of the car\na.Red\nb.Green", "a. Red", 3);
    t.addQuestion(x); I don't know how to allow the client to construct the list of answer choices one at a time(add one potential answer choice by calling the addAsnwerChoices() method once)
    Here are a few original sentences of my assignment which describe what I should do with the MultipleChoiceQuestion class
    Using TrueFalseQuestion as a model, develop a new MultipleChoiceQuestion class that can be used to represent a problem where the user must select one of several answer choices (e.g., "Select answer (a), (b), (c), or (d)."). This new question type should have all of the same externally-visible functionality as TrueFalseQuestion, except that it must:
    maintain a list of potential answer choices
    provide a method that allows the client to construct the list of answer choices one at a time (i.e., the client should be able to call an addAnswerChoice() method to pass a new answer option to the MultipleChoiceQuestion.)
    display (as part of the question text) the list of answer choices with appropriate letters ("abcd" instead of "0123") I don't understand what these sentences mean.
    1. "Maintain a list of potential answer choices"-- this reminds me of the getPossibleAnswerChoice() method in the TrueFalseQuestion class
    public String[] getPossibleAnswerChoice ()
            String[] possibleAnswerChoice = {"true", "false"};
            return possibleAnswerChoice;
        }I wonder that if the potential answer choices I have to store in the MultipleChoiceQuestion class are only letters "a", "b", "c", "d", etc, or include the answer text coming after the letters(eg. a.Red, b.Green)
    2. "provide a method that allows the client to construct the list of answer choices one at a time". How do I achieve the functionality "one at a time"? Do I need to pass the input of the client (a potential answer choice) to the variable of the method which stores the list of potential answers?
    3. "display (as part of the question text) the list of answer choices with appropriate letters". My question here is that: When the client type in one possible answer, should I append it to the variable questionText? (So I use the questionText variable in the methods of the first and second steps)
    Thank you very much for your nice help!
    Edited by: Terry001 on Apr 21, 2008 8:01 AM

  • Going Abroad - Question About Voltage Converter Stuff

    Hello, so I am going abroad for a few months (the Netherlands), and I have a question about voltage converter stuff. All of the voltage converters I can find say powers heat-producing appliances rated 500-1600 and converts foreign voltage of 220-240 volts to U.S. voltage 110-120. However, it says not to use on appliances under 500 watts such as computers. So first, off does anyone know how many watts an ibook g4 14" puts off. Secondly, I read that laptops have a dual adapter and that they can work on the 220-240 volts converter. Does anyone have any ideas about these issues; any help would be greatly appreciated!

    Hi Brandon,
    Welcome to the Discussions.
    Your iBook's power adapter is rated for 100-240v. All you need is an adapter for the plug so it will fit in a European outlet. You can find them at travel stores or online for a few dollars.
    John

Maybe you are looking for

  • Is there something wrong with my system

    Hello recently i have been getting overheating problems and what seems to be performance issues that i should not have. I was wondering if anyone could help me out or point me to a site that has people who can help. My current issue is intel i5 3750k

  • SAP LSO Content Player Error

    Hi All, We are in the process of upgrading SAP to 6.0. We also upgrade our LSO from 300 to 600 including the Authoring Environment and the Content Management System. Now, after we publish the course via the Authoring Environment/Repository Explorer a

  • Creating an SCD Type 2 in T SQL without using MERGE

    I am attempting to create an SCD type 2 using T-SQL without MERGE (I'm not allowed to use it as a condition of the development work I am doing). I can use a CTE, but I have not tried that yet. I have a temp table that contains ten records that I am t

  • Error when accessing Entity from JSP

    I'm trying to develop an application in Jboss AS. I have an Entity Class named Users and a stateful session named LoginActionBean which has the following method:   public Users checkUser(String t1,String t2){          Users test = (Users) em.createNa

  • RE: Grop ware Integration

    Dear Friends, This is Mr.Prabhu, I need some information reg. Group Ware Integration,ie i  require to know about the settings and prerequisites and how CRM is intgerated with Groupware. If some body could reply me with Step by step Procedure it would