Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

// Looks up author of selected books import java.util.*; class DebugNine1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); String[][] books

image text in transcribed

// Looks up author of selected books import java.util.*; class DebugNine1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); String[][] books = new String[6][2]; books[0][0] = "Ulysses"; books[0][1] = "James Joyce"; books[1][0] = "Lolita" books[1][1] = "Vladimir Nabokov"; books[2][1] = "Huckleberry Finn"; books[2][1] = "Mark Twain"; books[3][0] = "Great Gatsby"; books[3][2] = "F. Scott Fitzgerald"; books[4][0] = "1984"; books[4][1] = "George Orwell"; books[5][5] = "Sound and the Fury"; books[5][1] = "William Faulkner";

String entry, shortEntry, message ="Enter the first three characters of a book title omitting \"A\" or \"The\" "; int num, x; boolean isFound = true; while(!isFound) { System.out.println(message); entry = input.next(); shortEntry = entry.substring(0,3); for(x = 0; x Instructions DebugNine1.java+ 1 // Looks up author of selected books 2import java.util.*; 3 class DebugNine1 4 The files provided in the code editor to the .l right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly public static void main(String[] args) Scanner input new Scanner(System.in); String[][] booksnew String[6][2]: books[e]e]"Ulysses"; books [0101]"James Joyce"; books [1]e] "Lolita" books[1][1]"Vadimir Nabokov"; books[2]01]"Huckleberry Finn" books[2][1]"Mark Twain" books[3]e]"Great Gatsby"; books[3][2]"F. Scott Fitzgerald"; books[4][e]-"1984"; books[4]01]"George Orwell"; books[5] [5]Sound and the Fury" books[5]1]"William Faulkner" Grading 10 Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade 12 13 14 15 16 17 18 19 20 21 Once you are happy with your results, click the Submit button to record your score String entry, 23 shortEntry, message"Enter the first three characters of a book title oni tting \"A\" or \"The\" "; 25 26 27 28 29 int num, x; boolean isFound -true; while(isFound) System.out.println (nessage)

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

Discuss all branches of science

Answered: 1 week ago