anyone really good at java
hey im making a code for my online course and its really screwed i was wondering if anyone can help me
Code:
import java.awt.*;
import hs*****nsole;
public class Rcoster
{
static Console c; // The output console
static int tall;
static String bp;
static String heart;
static int totalScore;
static int score;
static int score1;
static int score2;
public static void main (String[] args)
{
c = new Console ();
c.println("How tall are you in CM?");
tall = c.readInt();
if (tall >=188 )
{
c.println("Sorry you are to tall to ride this rollar coaster");
}
else if (tall <= 122)
{
c.println("Sorry you are to short to ride this rollar coaster");
}
else
{
score=1;
}
c.println("Do you have any back problems? (Y)(N)");
bp = c.readLine();
if (bp=="N")
{
score1=1 ;
}
else if(bp=="Y")
{
c.println("Im sorry we dont want to risk more injury to your back so you may not ride the rollar coaster");
}
c.println("Do you have any heart problems? (Y)(N)");
heart = c.readLine();
if (heart=="N")
{
score2=1;
}
else if (heart=="Y")
{
c.println("Im sorry you may not ride the rollar coaster due to your health problem");
}
totalScore= (score+score1+score2);
c.println(totalScore);
if (totalScore==3)
{
c.println("Congratulations you may ride the rollar coaster enjoy your trip");
}
else if (score<3)
{
c.println("You may not ride the rollar coaster");
}
// Place your program here. 'c' is the output console
} // main method
} // Rcoster class
for some reason it wont count my score it always = 1 please help!!!