Enhance your UML Class Diagram for your Survey class to include an attribute, which is a grid to log survey results. It is expected that at most you will have 10 respondents to 10 survey questions. You must use a 2-dimensional array to represent a grid.

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.

Post your updated UML Class Diagram. Review two of your classmates’ diagrams, and provide feedback.

Update your design document to include the following:

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?

Implement the enhancements to your Survey class according to the requirements presented in the previous Discussion Board task.

To accomplish the task of further developing your Survey class from your updated UML Class Diagram, you will need to implement the following attributes and methods:

  • topRatedQuestion() method
  • lowRatedQuestion() method
  • presentQuestion() method with an int parameter for the question number
  • Overloaded presentQuestion() method with int parameters for both the question number and Respondent ID.

Update your test class to test all of the members added to this point. Update your Design Document for this Phase and any corrections needed from prior Phases.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.