Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that administers a short, if unscientific, personality test, sco

ID: 3671181 • Letter: W

Question

Write a program that administers a short, if unscientific, personality test, scores the test, and determines whether or not the user’s personality is Type A, Type B, or somewhere in between. The program should prompt the user to answer each of the eight questions with a number between the range of 1-5 where 1 means Never and 5 means always. The eight questions are:

I am competitive

I am annoyed by people who are late for appointments

I perform several tasks simultaneously

I am ambitious

I rush to get tasks completed

I worry about the future

I am in a race with time

I speak very rapidly

If the score is in the range of 35-40 Type A, 21-34 Between A and B, tending towards A, 12-20 Between A and B, tending towards B, 8-11 Type B. You should find someone to take your test and print out their score. The person that took your test must sign the paper and the paper will be turned in at the beginning of class.

Explanation / Answer

import java.util.;
public class PsychologyTest
{
   public static void main(String [] args)
   {
       Scanner input = new Scanner(System.in);
       int score = 0;
      
       System.out.println("Answer each of the following questions with a number from 1 to 5");
      
       System.out.println("such that 1 means 'NEVER' and 5 means 'ALWAYS' ");
      
       System.out.println("1. I am competitive");
       score = score + input.nextInt();
      
       System.out.println("2. I am annoyed by people who are late for appointments");
       score = score + input.nextInt();
      
       System.out.println("3. I perform several tasks simultaneously");
       score = score + input.nextInt();
      
       System.out.println("4. I am ambitious");
       score = score + input.nextInt();
      
       System.out.println("5. I rush to get tasks completed");
       score = score + input.nextInt();
      
       System.out.println("6. I worry about the future");
       score = score + input.nextInt();
      
       System.out.println("7. I am in a race with time");
       score = score + input.nextInt();
      
       System.out.println("8. I speak very rapidly");
       score = score + input.nextInt();
      
      
       System.out.println();
      
       if(score >= 35)
           System.out.println("Score:" + score + "Your personality is Type A");
       else

              
       if(score >= 21)
           System.out.println("Score:" + score + "You are between A and B tending towards A");
       else
          
       if(score >= 12)
           system.out.println("Score:" + score + "You are between A and B tending towards B");

           else
              
           System.out.println("Score:" + score + "Your Personality is Type B");
   }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote