Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I get the following error when running the code below, can someone help me fix it please C:UsersMichaelDesktopGradeTester.java:45: error: reached end of file while parsing

I get the following error when running the code below, can someone help me fix it please

C:\Users\Michael\Desktop\GradeTester.java:45: error: reached end of file while parsing } ^ 1 error

Tool completed with exit code 1

import java.util.Scanner;

public class GradeTester {

public static void main(String[] args) { // Declaring variables

/* * Creating an Scanner class object which is used to get the inputs * entered by the user */ Scanner sc = new Scanner(System.in); int grammer, spelling, correctlen, content; // Create an instance of Eassy Eassy compitition = new Eassy();

while (true) { System.out.print("Enter Points for Grammer :"); grammer = sc.nextInt();

System.out.print("Enter Points for Spelling :"); spelling = sc.nextInt();

System.out.print("Enter Points for Correct Length :"); correctlen = sc.nextInt();

System.out.print("Enter Points for Content :"); correctlen = sc.nextInt();

compitition.setGrammar(grammer); compitition.setSpelling(spelling); compitition.setCorrectLength(correctlen); compitition.setContent(content);

// Getting the character from the user 'Y' or 'y' or 'N' or 'n' System.out.print("Do you want to continue(Y/N) ::"); char ch = sc.next(".").charAt(0); if (ch == 'Y' || ch == 'y') continue; else { System.out.println(":: Program Exit ::"); break; }

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions