Topic 1 - Variables and Data Types
Topic 2 - Conditionals and Strings
Topic 3 - Loops
Topic 4 - Arrays
Topic 5 - File Handling
Semester 1 Projects
Topic 6 - Classes/Objects and Methods
Topic 7 - ArrayLists
Semester Projects

Part 1a: Personality Dimensions

A answers

Extrovert

Sensation

Thinking

Judging

B Answers

Introvert

iNtuition

Feeling

Perceiving

The Keirsey test involves 70 questions answered either A or B.  The A answers correspond to extravert, sensation, thinking and judging (the left-hand answers in the list above).  The B answers correspond to introvert, intuition, feeling and perceiving (the right-hand answers in the list above).  For each of these dimensions, we determine a number between 0 and 100 and indicate whether they were closer to the A side or the B side.  The number is computed by figuring out what percentage of B answers the user gave for that dimension (rounded to the nearest integer).

Let’s look at a specific example.  Suppose that someone’s answers divide up as follows:

We add up how many of each type of answer we got for each of the four dimensions.  Then we compute the percentage of B answers for each dimension.  Then we assign letters based on which side the person ends up on for each dimension.  In the Extrovert/Introvert dimension, for example, the person gave 9 “B” answers out of 10 total, which is 90%, which means they end up on the B side which is “Introvert” or I.  In the Sensing/iNtuition dimension the person gave 3 “B” answers out of 20 total, which is 15%, which means they end up on the A side with is “Sensing” or S.  

The overall scores for this person are the percentages (90, 15, 10, 10) which works out to a personality type of ISTJ.

This is because

the answers for I are >50% of the first dimension
the answers for N are <50% of the second dimension
the answers for F are <50% of the third dimension
the answers for P are <50% of the fourth dimension

Some people will end up with a percentage of 50 in one or more dimensions.  This represents a tie, where the person doesn’t clearly fall on either side.  In this case we use the letter “X” to indicate that the person is in the middle for this particular dimension.  The last two entries in the sample input file end up with X’s in their personality type.