Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I only have one error and it says the left hand side of an assignment must be a variable and i dont know how to

I only have one error and it says the left hand side of an assignment must be a variable and i dont know how to fix it
image text in transcribed
dow Help D lab 3 grades.java output Final Result.txt Scanner inputfile= new Scanner(myfile); // Creating a file for the output PrintStream output = new PrintStream("Final Result.txt"); while(inputfile.hasNext()) { ID = input file.nextInt(); correct = input file.nextInt(); Wrong = input file.nextInt(); Total = correct + Wrong; // Find the total correct answer and display them Total = correct + Wrong; // Check if the student answered more then 50 questions (Total > 50) output.println("ID" + ID); output.printf("%d right %d wrong", correct, Wrong); output.println(); output.println("Total Answered" + Total); if(Total > 50) { output.println("Error: more than 50 Questions Answered"); else { int omit = total_questions - Total; output.println("number omitted is" + omit); grades = correct * 2; if(grades > final_grades) { final grades = grades; best_ID = ID; output.println("grade is" + grades); if(Total ==0) { output.println("Error: No questions were answered "); d. Problems Javadoc Declaration Console 1

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_2

Step: 3

blur-text-image_3

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions