In this assignment, you will continue your project and 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 above.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() methodlowRatedQuestion() methodpresentQuestion() method with an int parameter for the question numberOverloaded presentQuestion() method with int parameters for both the question number and Respondent ID.Update your Design Document for this Phase and corrections needed from prior Phases. Update the screenshot(s) for the revised code to implement the enhancements to your Survey class.Finally, save your design document as “yourname_IP3.docx”. Click the “Edit” button on this submission node to submit the saved document.1 hour agoATTACHMENTSphillip_houston_ip2.docx
phillip_houston_ip2.docx
Unformatted Attachment Preview
Unit 2 Individual Project
Phillip Isiah Houston Sr.
{Jeffrey Hedrington}
{19 April 2017}
Colorado Technical University
Table of Contents
INTRODUCTION ……………………………………………………………………………………………………………………… 3
PHASE ONE ……………………………………………………………………………………………………………………………. 4
UML Class Diagram …………………………………………………………………………………………………………….. 4
Screenshot showing the code for the Survey class in NetBeans. ………………………………………………. 4
PHASE TWO …………………………………………………………………………………………………………………………… 4
Description ………………………………………………………………………………………………………………………… 5
Extended UML Class Diagram ………………………………………………………………………………………………. 6
Screenshots showing the extended source codes in the Survey class. ………………………………………. 6
INTRODUCTION
This project will involve step by step process of creating a user-friendly application that will
be presented to the customers. The overall application will be built on java under the
NetBeans IDE. The application will be built in modules under different classes each
performing a specific purpose. Each class function will be important for the working of the
overall application and hence the program will be tested between now and then and the test
results will be documented in a design document.
It is recommendable to begin building every application by creating its design. Therefore, am
going to create to begin by creating the design of the application which will include the UML
Class Diagram for the Survey class using Visio as my design tool. The class will have
different methods with each performing a specific purpose in the application.
The class will include a static variable called “respondentID” which will store the current
respondent’s ID. The value of this variable will be incremented by one as each respondents
complete the survey.
The class will have another variable called “title”. This variable will be used to hold the title
of the survey.
The class will also include two overloaded constructors for the project title. These constructor
are named “programTitle()” and the first constructor will set the default survey title
“Customer Survey”. This constructor will not take any argument. The second constructor will
accept a String value for the survey title and then set it to the variable named “title”.
Finally, the survey class will have a user defined method named “generateRepondentId()”
which will return the next value of the respondent’s ID i.e. increment the respondent’s ID by
one.
PHASE ONE
UML Class Diagram
Screenshot showing the code for the Survey class in NetBeans.
PHASE TWO
Description
This phase includes extending phase one to enhance the UML Class Diagram for the Survey
Class to include an attribute. This attribute involves a grid to log survey results for at most 10
respondents to 10 survey. This attribute will be implemented using a 2-dimensional array
which will represent the grid.
In this phase, the Survey class will include addition methods each resulting to an added
function. The first additional method will be “displaySurveyResults()” method. This method
will be used in the program to print the name of the survey and display the entire grid that
holds the result.
The second method will be the “displayQuestionStats()” method. This method will be take an
integer value as a parameter and display the responses entered so far for that question in a
tabular form.
The class will also contain an additional method “enterQuestions()” which will allow the user
to enter and store 10 questions for the survey. This method will be called prior to the other
methods in the main method to allow the user to enter the 10 questions.
The last method for this phase will be “logResponse()” method. This method will take three
values arguments of type integer. The first argument will be the respondent id, followed by
question number, and the last argument will be the user response. This method will then enter
the response into the right location on the survey grid and will correspond to the respondent
id and the question number.
Extended UML Class Diagram
Screenshot(s) showing the extended source codes in the Survey class.
References
Dustinm. (2009). How to show an ArrayList attribute in UML class diagram? Retrieved from
Dreamincode: http://www.dreamincode.net/forums/topic/144419-how-to-show-anarraylist-attribute-in-uml-class-diagram/
How to insert values in two dimensional array programmaticaly? (2012). Retrieved from
Stackoverflow: http://stackoverflow.com/questions/10751603/how-to-insert-values-in-twodimensional-array-programmaticaly
Singh, C. (2016). Method Overloading in Java with examples. Retrieved from Beginnersbook:
…
Purchase answer to see full
attachment
Recent Comments