Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Myers-Briggs personality test

ibby786
ibby786 


Write a program to score users’ responses to the classic Myers-Briggs personality test. Assume that the test has 70 questions that determine a person’s personality in four dimensions. Each question has two answer choices that we’ll call the “A” and “B” answers. Questions are organized into 10 groups of seven questions, with the following repeating pattern in each group: • The first question in each group (questions 1, 8, 15, 22, etc.) tells whether the person is introverted or extroverted. • The next two questions (questions 2 and 3, 9 and 10, 16 and 17, 23 and 24, etc.) test whether the person is guided by his or her senses or intuition. • The next two questions (questions 4 and 5, 11 and 12, 18 and 19, 25 and 26, etc.) test whether the person focuses on thinking and feeling. • The final two questions in each group (questions 6 and 7, 13 and 14, 20 and 21, 27 and 28, etc.) test whether the person prefers to judge or be guided by perception. In other words, if we consider introversion/extraversion (I/E) to be dimension 1, sensing /intuition (S/N) to be dimension 2, thinking/feeling (T/F) to be dimension 3, and judging/perception (J/P) to be dimension 4, the map of questions to their respective dimensions would look like this: 1223344122334412233441223344122334412233441223344122334412233441223344 BABAAAABABAAAABABAAAABABAAAABABAAAABABAAAABABAAAABABAAAABABAAAABABAAAA If less than 50% of a person’s responses are B for a given personality dimension, the person’s type for that dimension should be the first of its two choices. If the person has 50% or more B responses, that person’s type for that dimension is the second choice. Your program should output each person’s name, the number of A and B responses for each dimension, the percentage of Bs in each dimension, and the overall personality type. The following should be your program’s output: Betty Boop: 1A-9B 17A-3B 18A-2B 18A-2B [90%, 15%, 10%, 10%] = ISTJ Snoopy: 7A-3B 11A-9B 14A-6B 6A-14B [30%, 45%, 30%, 70%] = ESTP Attachments Tags
Clarifications

Answers

Personality Test Solution

Seeker
Seeker 



JAVA source code attached.

Hashtable and printf command used
Attachments
PersonalityTest.zip (29 K) Download
Preview

Preview
aabaabbabbbaaaabaaaabaaaaababbbaabaaaabaabbbbabaaaabaabaaaaaabbaaaaabb Han

Preview
} private void calculateSenseIntuition(String question2, String question3){ if(question2.equalsIgnoreCase("a")){ insertAnswer(senseIntuition, "A"); }else if(question2.equalsIgnoreCase("b")){ insertAnswer(senseIntuition, "B"); } if(question3.equalsIgnoreCase("a")){ insertAnswer(senseIntuition, "A"); }else if(question3.equalsIgnoreCase("b")){ insertAnswer(senseIntuition, "B"); } } private void calculateIntrovertExtrovert(String question1){ if(question1.equalsIgnoreC

Screenshots
Screenshot
Purchase Answer

JAVA Personality Test Solution

Seeker
Seeker 



Source code attached.

Simple arrays and constructs used.
Attachments
PersonalityTest.java (7 K) Download Preview
and cast to get an even number int senseAvg = (int)Math.round(dsenseAvg); // Append percent sign String ssenseAvg = senseAvg + "%"; String si; if(senseAvg < 50){ si = "S"; }else if(senseAvg > 50){ si = "N"; }else{ si = "X";

Results.txt (1 K) Download Preview
Betty Boop

Preview.jpg (46 K) Download Preview

Screenshots
Screenshot
Purchase Answer