1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

c++ program reqd

Discussion in 'C++' started by vasujain, Apr 30, 2009.

  1. vasujain

    vasujain New Member

    Joined:
    Apr 30, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum number of respondents, MIN_RESPONSE_VALUE to represent the lowest permissible response value, and MAX_RESPONSE_VALUE to represent the highest. Use an array to accumulate the total count of how many of each response value has been entered. If a value is out of range, it must be discarded and the same respondent prompted again. If a respondent desires to terminate the survey before all respondents have been polled, that respondent may enter a specific number of out of range responses in a row, which the program uses as a survey termination flag.

    Once the survey is terminated, either because all respondents have been polled or because of out of range responses, the program will output the total number of respondents that gave each of the possible responses.

    Program output should look something like the following, depending upon the chosen range:
    Rating Number of Responses
    10 25
    9 50
    8 100
    ... ...
    -1239 0
    • Declare only one array, which must contain one and only one element for each legal response value. This array may not contain a separate element for each respondent.
    • Use a macro to define the number of consecutive out of range responses required to terminate.
    • The program is to be done using classes.
    • Test using different numbers of respondents and both negative and positive response ranges.

    i need this really urgent...please do help
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    We don't do homework but don't mind helping out. What have you got so far and where are you stuck?
    If posting code please use code tags to retain formatting.
     

Share This Page