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 1d: B Percentages and Personality Types

You should round percentages to the nearest integer.  You can use the Math.round method to do so, but you will have to cast the result to an int, as in:

int percent = (int) Math.round(percentage);

One of the things to keep in mind for this program is that you are transforming data from one form to another.  

  1. You start with a String that has 70 characters in it.  
  2. You convert that into two sets of counters (how many A answers for each dimension, how many B answers for each dimension).  
  3. You convert that into a set of percentages.  
  4. And you finally convert that into a String that represents the personality type.  

If you work through this step by step, the problem will be easier to solve.  The following diagram summarizes the different transformations: