Programming Assignment P4

Keirsey-Bates Temperment Scorer


The Keirsey-Bates Temperment Survey is a personality inventory instrument.  To get an idea of what it is like, you may want to complete the online Keirsey-Bates Temperament Scorer.  Plan to take about 20 minutes.  When you finish the survey, you will be shown a results page with an interpretation of your temperament. OVERVIEW You are to write a program that will assist in analyzing responses to the 70 question Keirsey-Bates Temperment Survey. It scores the responses and produces a personality "type" according to the scoring formula in the Keirsey-Bates textbook.

INPUT  
A 70 character string representing a response to each item in the survey instrument.  Each character is 'A' or 'B', a response to one of the survey questions. Note: it's assumed that the responses are in the same order as the 70 questions on the survey.

OUTPUT  
A 4 character string, containing one of the Keirsey-Bates types, or "ERR!" if there was invalid input.

FUNCTIONS

Use the Keirsey-Bates scoring directions.

ERROR HANDLING
Return "ERR!" if the Responses input is not 'A' or 'B' or if there are not exactly 70 characters.

IMPLEMENTATION CONSTRAINTS

          Your Java class must be named KeirseyScorer.  The scoring function must be a static method with the following signature:
       public static String evaluateSurvey(String responses)

  
          Your class should send no output to standard output.

Unit Testing

You must submit execution output that demonstrates that your program can produce the correct results.  This output can be created in one of two ways:

Perform any additional tests you want to convince yourself that your solution is correct.

Acceptance Testing

In addition, your program must pass the instructor's acceptance test.  Once you are satisfied that your program is correct and is passing your unit tests, create a new time log entry.  Enter "Test" for the phase and in the comment field enter "Acceptance Testing".

Submit your source code using the Web-CAT grader. On this project the grader will not run your own unit tests. Web-CAT will report checkstyle errors in red and they WILL count in your total score. Each coding standard violation is a defect. The defect type is 10 for code syntax, and 80 for Javadoc errors. (Tip: To avoid getting style errors in Web-CAT, run the Checkstyle extension in BlueJ before submitting to Web-CAT.)

If Web-CAT reports any errors, tally them in a new section of the defect tally with a removal phase of "Acceptance Testing".  You are allowed five Web-CAT submissions without penalty.  If you take more than five submissions, your project earns only half-credit.

When Web-CAT assigns a 100% score to your work, you should finalize your work according to the assignment directions.