954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C++ Prog..........urgent

Q1:

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.

jagdeep89
Newbie Poster
1 post since Apr 2009
Reputation Points: 9
Solved Threads: 0
 

>>It's urgent for me pls sir

But it's not urgent for any of us. I could care less whether you pass or fail -- its your grade not mine. And we are not all men, so "sir" is inappropriate.

Post what you have tried, or have you even tried to write it yourself?

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Hi jagdeep89
Do you this some one here will be ready with their sys to post solution for the work assigned to you.

Come on:
Post your code, if there is any doubt or correction needed, with pleasure, I am ready to do that.

bugista
Newbie Poster
19 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

this is no place for us to do your homework... why don't you check your notes and come back later?

Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You