Question: I am using Netbeans to write a code with the following guidelines in Java. I keep running into errors. my code is a jumbled mess

I am using Netbeans to write a code with the following guidelines in Java. I keep running into errors. my code is a jumbled mess and could use help

The Survey class will have a static class variable that stores the current respondent's ID. As respondents complete the survey, this value will be incremented by one.

The Survey class will have an instance variable to hold the title of the survey.

The Survey class should have two overloaded constructors.

The first constructor should take no arguments. It should set the survey title to a default value of "Customer Survey".

The second constructor should accept a String value for the survey title. It should reset the static respondent ID to zero. It should set the survey title to the value passed into the constructor.

The survey class should have a generateRespondentId() method which returns the next value of the respondent ID. This method should increment the static instance variable for the respondent ID by one.

The Survey class should have a displaySurveyResults() method that prints out the name of the survey and displays the entire grid that holds the results.

The Survey class should have a displayQuestionStats() method that takes an int value that is the question number and displays the responses entered so far for that question in tabular form.

Your Survey class should store 10 questions in an array of Strings. Your class should have an enterQuestions() method that allows the user to enter 10 questions for a 10-question survey. This should be done prior to the survey application starting a survey.

Create a method in your Survey class called "logResponse()." This method should take three arguments. The first argument is an int value (which is the respondent id); the second argument is an int value (which is the question number); and the third argument is an int value, which is the response entered (value from 1 to 5). This method should enter the response into the right location on the survey grid that corresponds to the respondent ID and the question number.

The Survey class should have a method called "topRatedQuestion()," which performs an analysis of all responses for each question and returns the number of the question that had the most positive responses.

The Survey class should have a method called "lowRatedQuestion()," which performs an analysis of all responses for each question and returns the number of the question that had the lowest responses.

The Survey class should have a presentQuestion() method that takes an int value, which is the question number it should display to the user. The question number should be used to access the right question from the array of strings which hold the questions.

Override the presentQuestion() method so that it takes both the question number and the respondent ID. The first argument is an int value, which is the question number it should display to the user. The second argument is an int, which is the respondent ID. If this method is called, both the respondent ID and the question will be displayed. The question number should be used to access the right question from the array of strings, which hold the questions. This allows you to present the question to the respondent in a more personalized way. For example: Respondent 5, please respond to the following survey question: How satisfied were you with your most recent visit?

Create a SurveyConductor application that uses your Survey class to conduct a survey. This could be a new class to conduct the survey in a professional manner.

The application should construct a survey and allow respondents to enter survey data until there are no more respondents or until 10 respondents have entered survey data. The system constraint is that you cannot have more than 10 respondents to the survey.

As each question is presented, by calling the presentQuestion() method, it will validate the respondent's response. If the response is not a number between 1 and 5, give the user a chance to re-enter his or her response.

After each respondent has completed entering the survey data, display the survey results, top-rated question, and low-rated question.

The survey results should be displayed as rows and columns in a matrix.

The application should allow a user to enter a question number and view just the responses for that question in tabular form by calling the displayQuestionStats() method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!