Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Ive tried compiling it and it says I have 3 errors. 2 on line 51 and 1 on line 55.

Hello so I wrote this code for a homework assignment. Ive tried compiling it and it says I have 3 errors. 2 on line 51 and 1 on line 55. Can you please help me identify what these 3 errors are and how they can be fixed please ? Thank you so much ! I have pasted the code below.

public class Homework1 {public static void main(String[] args) {// Variables to hold valuesbyte year = 0;int month = 0;float latitude = 0.0f;float longitude = 0.0f;System.out.println("Welcome to My Very Own Survey"); // Use the Scanner class to input data from Standard I/OScanner scannerIn = new Scanner(System.in);// Prompt the user to enter their Birth YearSystem.out.println("Please enter your Birth Year (1900-2014):");year = scannerIn.nextByte();// Verify the Birth YearSystem.out.println("The following Year was entered " + year);//Prompt the user to enter their Birth MonthSystem.out.println("Please enter your Birth month (1-12):");// the nextInt() method scans the next int valuemonth = scannerIn.nextInt();// Verify the Birth month was enteredSystem.out.println("The following month was entered " + month);//Prompt the user to enter their day of BirthSystem.out.println("Please enter your birth DATE (1-31):");// the nextInt() method scans the next int valuemonth = scannerIn.nextInt();// Prompt the user to enter the latitude of their addressSystem.out.println("Please enter the latitude of your address:");latitude = scannerIn.nextFloat();// Prompt the user to enter the longitude of their addressSystem.out.println("Please enter the longitude of your address:");longitude = scannerIn.nextFloat();// Prompt the User to enter their current GPASystem.out.println("Enter your current GPA (0.0-4.0):");// Display all results to Standard OutputSystem.out.println("***Thank you for completing my survey***");System.out.println("You have entered the following data:");System.out.println("Birth Year is:" + Year);System.out.println("Birth month is :" + Birth month);System.out.println("Birth Day is :" + day);System.out.println("latitude is :" + latitude);System.out.println("longitude is :" + longitude);System.out.println("GPA is :" + GPA);

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question