Click here to Skip to main content
15,890,882 members
Home / Discussions / Java
   

Java

 
QuestionHow to write Pin
udch6-Aug-09 1:33
udch6-Aug-09 1:33 
AnswerRe: How to write Pin
fly9046-Aug-09 1:44
fly9046-Aug-09 1:44 
General[Message Deleted] Pin
vibhadubey6-Aug-09 3:11
vibhadubey6-Aug-09 3:11 
GeneralRe: How to write Pin
fly9046-Aug-09 3:26
fly9046-Aug-09 3:26 
Questionweb services Pin
benjamin yap5-Aug-09 17:47
benjamin yap5-Aug-09 17:47 
QuestionHelp needed with a source code Pin
Ogunjimi Adewale5-Aug-09 12:06
Ogunjimi Adewale5-Aug-09 12:06 
AnswerRe: Help needed with a source code Pin
fly9045-Aug-09 23:30
fly9045-Aug-09 23:30 
QuestionCORRECTION FOR MA CODE: Dr Phils Personality test Pin
Ogunjimi Adewale6-Aug-09 9:57
Ogunjimi Adewale6-Aug-09 9:57 
ok, truth is i need help with the termination part, could u like take a look n help with corrections



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package doctorphilsiqtest;
import java.util.Scanner;

/**
*
* @author wales_mon
*/
public class DoctorSecond
{
private static int i;
public static void main(String []args)
{
// TODO code application logic here
String choice;
int a1 = 0,b1 = 0,c1 = 0,d1 = 0,e1 = 0,f1 = 0,g1 = 0,score = 0;


Scanner input = new Scanner(System.in);
System.out.println("\nDr Phil's Test");
System.out.println("Dr PHIL SCORE 55.He DID THIS TEST ON OPRAH....SHE GOT 38.");
System.out.println("Some folks pay alot of money to find this stuff out.");
System.out.println("Read on this is very interesting! Don't be overly sensitive!");
System .out.println("It's pretty accurate & it only takes about 2 minutes.");

System.out.println("* Take this test for yourself and send it to your friends,");
System.out.println(" including the person who sent it to you.");
System.out.println("* The person who sent it placed their score in the SUBJECT box.");
System.out.println("* Please do the same before .");
System.out.println("* Answers are for who you are now .... not who you were in the past.");
System.out.println("* Have a pen or pencil and paper ready.");
System.out.println("* This is a real test given by the Human Relations Dept. at many \nof major corporations" +
"today. It helps them get better insight concerning their employees and prospective employees. ");
System.out.println("* There are 10 simple questions. So...grab a pencil and paper, keep track of your letter answers. ");
System.out.println("* Make sure to change the subject of the e-mail to read YOUR total score.");
System.out.println("* When you are finished, forward this to everyone you know,and also send it to the " +
"person who send this to you.");
System.out.println("* Number your paper 1 to 10");
System.out.println("* Please choose enter the option that best suit your answer a, b,c,d,e,f");
System.out.println("* are you ready: If you are ready Enter A to start");
choice=input.nextLine();

for(i=0;i<=12;i++){
System.out.println("*1 When do you feel at your best...");
System.out.println("(a)in the morning (b)during the afternoon and early evening (c)late at night");
choice = input.nextLine();
a1+= 2;b1+= 4;c1+= 6;
if(choice.equals("a"))
{
System.out.println("u feel best in the morning="+a1);
}
else if(choice.equals("b"))
{
System.out.println("u feel best during the afternoon and early evening"+b1);
}
else if(choice.equals("c"))
{
System.out.println("u feel best late at night"+c1);
}
else
System.out.println("Invalid input");

System.out.println("*2 you usually walk...");
System.out.println("(a)fairly fast, with long steps (b)fairly fast, with little steps(c)less fast head up,looking the world in the face" +
"(d)less fast,head down (e)very slowly)");
choice=input.nextLine();

a1+=6;b1+=4;c1+=7;d1+=2;e1+=1;
if(choice.equals("a"))
{
System.out.println("fairly fast, with long steps="+a1);
}
else if(choice.equals("b"))
{
System.out.println("fairly fast, with little steps="+b1);
}
else if(choice.equals("c"))
{
System.out.println("less fast head up,looking the world in the face="+c1);
}
else if(choice.equals("d"))
{
System.out.println("less fast,head down="+d1);
}
else if(choice.equals("e"))
{
System.out.println("very slowly="+e1);
}
else
System.out.println("Invalid input");


System.out.println("*3 When talking to people you...");
System.out.println("(a)stand with your arms folded (b)have your hands clapsed(c)have one or both your hands on your hips or in pocket" +
"(d)touch or push the person to whom you are talking(e)play with your ear, touch you chin or touch your hair.");

choice=input.nextLine();

a1+=4;b1+=2;c1+=5;d1+=7;e1+=6;
if(choice.equals("a"))
{
System.out.println("stand with your arms folded="+a1);
}
else if(choice.equals("b"))
{
System.out.println("have your hands clapsed="+b1);
}
else if(choice.equals("c"))
{
System.out.println("have one or both your hands on your hips or in pocket="+c1);
}
else if(choice.equals("d"))
{
System.out.println("touch or push the person to whom you are talking="+d1);
}
else if(choice.equals("e"))
{
System.out.println("play with your ear, touch you chin or touch your hair="+e1);
}

else
System.out.println("Invalid input");

System.out.println("*4 When relaxing you sit with...");
System.out.println("(a)your knees bent with your legs neatly side by side(b)your legs crossed(c)your legs stretched out or straight" +
"(d)one leg curled under you");
choice=input.nextLine();

a1+= 4;b1+= 6;c1+= 2;d1+= 1;

if(choice.equals("a"))
{
System.out.println("your knees bent with your legs neatly side by side="+a1);
}
else if(choice.equals("b"))
{
System.out.println("your legs crossed="+b1);
}
else if(choice.equals("c"))
{
System.out.println("your legs stretched out or straight="+c1);
}
else if(choice.equals("d"))
{
System.out.println("one leg curled under you="+d1);
}
else
System.out.println("Invalid input");

System.out.println("*5 When something really amuses you, you react with... ");
System.out.println("(a) a big appreciated laugh(b) a laugh, but not a loud one(c) a quiet chuckle(d) a sheepish smile");
choice=input.nextLine();

a1+= 6;b1+= 4;c1+= 3;d1+= 5;
if(choice.equals("a"))
{

System.out.println("a big appreciated laugh="+a1);
}
else if(choice.equals("b"))
{
System.out.println("a laugh, but not a loud one="+b1);
}
else if(choice.equals("c"))
{
System.out.println("a quiet chuckle="+c1);
}
else if(choice.equals("d"))
{
System.out.println("a sheepish smile="+d1);
}
else
System.out.println("Invalid input");

System.out.println("*6 When you go to a party or social gathering, you... ");
System.out.println("(a)make aloud entrance so everyone notices you(b)make a quiet entrance, looking around for someone you know" +
"(c)make the quietest entrance, trying to stay unnoticed");
choice=input.nextLine();
a1+= 6;b1+= 4;c1+= 2;
if(choice.equals("a"))
{

System.out.println("make aloud entrance so everyone notices you="+a1);
}
else if(choice.equals("b"))
{
System.out.println("make a quiet entrance, looking around for someone you know="+b1);
}
else if(choice.equals("c"))
{
System.out.println("make the quietest entrance, trying to stay unnoticed="+c1);
}
else
System.out.println("Invalid input");


System.out.println("*7 When you're working or concentrating very hard, and you're interrupted, you... ");
System.out.println("(a)welcome the break(b)feel extremely irritated" +
"(c)vary between the two examples");
choice=input.nextLine();
a1+=6;b1+=2;c1+=2;

if(choice.equals("a"))
{

System.out.println("welcome the break="+a1);
}
else if(choice.equals("b"))
{
System.out.println("feel extremely irritated="+b1);
}
else if(choice.equals("c"))
{
System.out.println("vary between the two examples="+c1);
}
else
System.out.println("Invalid input");

System.out.println("*8 Which of the colour do you like most... ");
System.out.println("(a)red of orange(b)black (c)yellow(d)green(e)dark blue or purple(f)white(g)brown or gray");
choice=input.nextLine();
a1+=6;b1+=7;c1+=5;d1+=4;e1+=3;f1+=2;g1+=1;
if(choice.equals("a"))
{

System.out.println("red of orange="+a1);
}
else if(choice.equals("b"))
{
System.out.println("black="+b1);
}
else if(choice.equals("c"))
{
System.out.println("yellow="+c1);
}
else if(choice.equals("d"))
{
System.out.println("green="+d1);
}
else if(choice.equals("e"))
{
System.out.println("dark blue or purple="+e1);
}
else if(choice.equals("f"))
{
System.out.println("White="+f1);
}
else if(choice.equals("g"))
{
System.out.println("brown or gray="+g1);
}
else
System.out.println("Invalid input");


System.out.println("*9 When you are in bed at night, in the those last few moments before going to sleep, you... ");
System.out.println("(a)stretched out on your back(b)stretched out face down on your stomach(c)on your side slightly curled" +
"(d)with your head on one arm(e)with your head under the covers");
choice=input.nextLine();
a1+=7;b1+=6;c1+=4;d1+=2;e1+=1;
if(choice.equals("a"))
{

System.out.println("stretched out on your back="+a1);
}
else if(choice.equals("b"))
{
System.out.println("stretched out face down on your stomach="+b1);
}
else if(choice.equals("c"))
{
System.out.println("on your side slightly curled="+c1);
}
else if(choice.equals("d"))
{
System.out.println("with your head on one arm="+d1);
}
else if(choice.equals("e"))
{
System.out.println("with your head under the covers="+e1);
}

else
System.out.println("Invalid input");


System.out.println("*10 you often dream that you are... ");
System.out.println("(a)falling(b)fighting or struggling(c)searching for something or somebody(d)flying or floating" +
"(e)you ususally have a dreamless sleep(f)your dreams are always pleasant");
choice=input.nextLine();
a1+=4;b1+=2;c1+=3;d1+=5;e1+=6;f1+=1;
if(choice.equals("a"))
{

System.out.println("falling="+a1);
}
else if(choice.equals("b"))
{
System.out.println("fighting or struggling="+b1);
}
else if(choice.equals("c"))
{
System.out.println("searching for something or somebody="+c1);
}
else if(choice.equals("d"))
{
System.out.println("flying or floating="+d1);
}
else if(choice.equals("e"))
{
System.out.println("you ususally have a dreamless sleep="+e1);
}
else if(choice.equals("f"))
{
System.out.println("your dreams are always pleasant YOUR TOTAL SCORE ="+f1);
}

else
System.out.println("Invalid Input");


System.out.println("ARE YOU READY TO DISCOVER YOURSELF");

score=a1+b1+c1+d1+e1+f1+g1;
if(score >=60)
{
System.out.println("OTHERS SEE YOU AS SOMEONE THEY SHOULD" +
"HANDLE WITH CARE. YOU'RE SEEN AS VAIN, SELF-CENTERED AND ONE WHO " +
"IS EXTREMELY DOMINEERING." +
"OTHERS MAY ADMIRE YOU, WISHING THEY COULD BE MORE LIKE YOU, BUT DON'T" +
"ALWAYS TRUST YOU, HESITAING TO BECOME TOO DEEPLY INVOLVED WITH YOU.");
}

else if(score>=51 && score<=60)
{
System.out.println("OTHERS SEE YOU AS AN EXCITING, HIGHLY VOLATILE, RATHER IMPULSIVE PERSONALITY;");
System.out.println( "A NATURAL LEADER ONE WHO IS QUICK TO MAKE DECISIONS,THOUGH NOT ALWAYS THE RIGHT ONE'S" );
System.out.println("THEY SEE YOU AS BOLD AND ADVENTURE, SOMEONE WHO TAKES CHANCES AND ENJOYS AN ADVENTURE." );
System.out.println( "THEY ENJOY BEING IN YOUR COMPANY BECAUSE OF THE EXCITEMENT YOU RADIATE");
}
else if(score>=31 && score<=40)
{
System.out.println("YOU ARE NOT A PERSON WHO MAKES FRIENDS TOO QUICKLY OR EASILY, BUT SOMEONE WHO IS " );
System.out.println("EXTREMELY LOYAL TO FRIENDS, YOU DO MAKE AND WHO EXPECT THE SAME LOYALTY IN RETURN. THOSE WHO");
System.out.println("REALLY GET TO KNOW YOU REALIZE IT TAKES ALOT TO SHAKE YOUR TRUST IN YOUR FRIENDS, BUT EQUALLY");
System.out.println("THAT IT TAKES YOU A LONGTIME TO GET OVER IT IF THAT TRUST IS EVER BROKEN ");
}
else if(score>=21 && score<=30)
{
System.out.println("YOUR FRIENDS SEE YOU AS PAINSTAKING AND FOSSY.THEY SEE YOU AS VERY CAUTIONS, EXTREMELY");
System.out.println("CAREFUL, ASLOW AND STEADY PLODDER. IT WOULD REALLY SURPRISE THEM IF YOU EVER DID SOMETHING");
System.out.println("IMPULSIVELY OR ON THE SPUR OF THE MOMENT, EXPECTING YOU TO EXAMINE EVERYTHING CAREFULLY FROM EVERY");
System.out.println("ANGLE AND THEN USUALLY DECIDE AGAINST IT. THEY THINK THIS REACTION IS CAUSED " );
System.out.println("PARTLY BY YOUR CAREFULL NATURE.");
}
else if(score <=20)
{
System.out.println("PEOPLE THINK YOU ARE SHY, NERVOUS, AND INDECISIVE, SOMEONE WHO NEEDS LOOKING AFTER,");
System.out.println("WHO ALWAY WANTS SOMEONE ELSE TO MAKE THE DECISIONS AND WHO DOESN'T WANT TO ");
System.out.println("GET IVOLVED WITH ANYONE OR ANYTHING!");
System.out.println("THEY SEE YOU AS A WORRIER WHO ALWAYS SEES PROBLEMS THAT DOESN'T EXIST.");
System.out.println("SOME PEOPLE THINK YOU'RE BORING ONLY THOSE WHO KNOW YOU KNOW THAT YOU AREN'T");

}
else


System.out.println("Input invalid");
}


}









}
AnswerRe: CORRECTION FOR MA CODE: Dr Phils Personality test Pin
fly9046-Aug-09 10:10
fly9046-Aug-09 10:10 
GeneralRe: CORRECTION FOR MA CODE: Dr Phils Personality test Pin
Ogunjimi Adewale7-Aug-09 10:09
Ogunjimi Adewale7-Aug-09 10:09 
GeneralRe: CORRECTION FOR MA CODE: Dr Phils Personality test Pin
fly9047-Aug-09 11:39
fly9047-Aug-09 11:39 
GeneralRe: CORRECTION FOR MA CODE: Dr Phils Personality test Pin
fly9047-Aug-09 11:56
fly9047-Aug-09 11:56 
Generalthanks Pin
Ogunjimi Adewale8-Aug-09 11:17
Ogunjimi Adewale8-Aug-09 11:17 
QuestionBottom toolbar like facebook application Pin
sangeethanarayan5-Aug-09 1:04
sangeethanarayan5-Aug-09 1:04 
AnswerRe: Bottom toolbar like facebook application Pin
fly9045-Aug-09 2:20
fly9045-Aug-09 2:20 
QuestionJ2me: wireless tookit error. Pin
udombat4-Aug-09 21:24
udombat4-Aug-09 21:24 
AnswerRe: J2me: wireless tookit error. Pin
carlospc19705-Aug-09 4:38
professionalcarlospc19705-Aug-09 4:38 
GeneralRe: J2me: wireless tookit error. Pin
udombat5-Aug-09 5:18
udombat5-Aug-09 5:18 
GeneralRe: J2me: wireless tookit error. Pin
carlospc19705-Aug-09 5:47
professionalcarlospc19705-Aug-09 5:47 
GeneralRe: J2me: wireless tookit error. Pin
udombat5-Aug-09 6:52
udombat5-Aug-09 6:52 
GeneralRe: J2me: wireless tookit error. Pin
carlospc19705-Aug-09 7:05
professionalcarlospc19705-Aug-09 7:05 
QuestionASP.Net with Java Windows Pin
PDTUM4-Aug-09 17:02
PDTUM4-Aug-09 17:02 
QuestionMozilla Firefox Pin
TCSJoe3-Aug-09 18:29
TCSJoe3-Aug-09 18:29 
AnswerRe: Mozilla Firefox Pin
fly9044-Aug-09 7:29
fly9044-Aug-09 7:29 
Questionout of heap Exception Pin
shammasi31-Jul-09 20:24
shammasi31-Jul-09 20:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.