The files provided in the code editor to the 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. An example of the program is shown below: Enter name Juan Hello, Juan!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

Instructions

The files provided in the code editor to the 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.

An example of the program is shown below:

Enter name Juan Hello, Juan!

 

Task 1: The DebugThree3 class compiles without error.

 

Task 2: The getName() method accepts user input for a name and returns the name value as a String.

 

Task 3: The displayGreeting() method displays a personalized greeting.

 

Task 4: The DebugThree3 program accepts user input and displays the correct output.

 

0
€03
C
> OUTLINE
> TIMELINE
LNCX & FO
FOJOJ
JOJOJO FC S HO FC C j. Cc
https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423_java-programming-10e-5...
EXPLORER
✓ STUDENT [CODESPACES: LITERATE SNIFFLE]
J DebugThree3.java
> JAVA PROJECTS
* Codespaces: literate sniffle
G F
template A0
J DebugThree3 java x
J DebugThree3java >.
1 // This application gets a user's name
// and displays a greeting
import java.util.Scanner;
public class DebugThree3
{
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 }
public static void main(String args[])
{
String name;
name getName()
displayGreeting (namme);
}
public static String getName (void)
{
String name;
Scanner input new Scanner(System.in);
System.in.print("Enter name ");
}
name input.nexlLine();
return namer;
}
public static displayGreeting (String name)
name + "!");
System.outprintln("Hello,
PORTS 1 COMMENTS
1 Java Lightweight Mode
student (Codespaces: literate sniffle]
PVNOM
BUS
Welcome
C
= Companion X
wwwwwwwwwwwwww po
PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL
@juvwenisees →/2100231013463_java-pi ugi ammang-ave-20031JOL-LILO-4200-3026-313602363143/L110plti 3/ uU LOVCIL (Lemplate) a
C at C
Q
A
Enter name Juan
Hello, Juan!
run the program to ensure it works properly.
An example of the program is shown below:
C C
{}
07
Task 1: The DebugThree3 class compiles without error.
+
Task 2: The getName() method accepts user input for a name and returns the
name value as a string.
Task 3: The displayGreeting() method displays a personalized greeting.
Task 4: The DebugThree3 program accepts user input and displays the correct
outout
V
bash +
用
4
❤
O
Layout: US
08
X
Transcribed Image Text:0 €03 C > OUTLINE > TIMELINE LNCX & FO FOJOJ JOJOJO FC S HO FC C j. Cc https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423_java-programming-10e-5... EXPLORER ✓ STUDENT [CODESPACES: LITERATE SNIFFLE] J DebugThree3.java > JAVA PROJECTS * Codespaces: literate sniffle G F template A0 J DebugThree3 java x J DebugThree3java >. 1 // This application gets a user's name // and displays a greeting import java.util.Scanner; public class DebugThree3 { 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 } public static void main(String args[]) { String name; name getName() displayGreeting (namme); } public static String getName (void) { String name; Scanner input new Scanner(System.in); System.in.print("Enter name "); } name input.nexlLine(); return namer; } public static displayGreeting (String name) name + "!"); System.outprintln("Hello, PORTS 1 COMMENTS 1 Java Lightweight Mode student (Codespaces: literate sniffle] PVNOM BUS Welcome C = Companion X wwwwwwwwwwwwww po PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL @juvwenisees →/2100231013463_java-pi ugi ammang-ave-20031JOL-LILO-4200-3026-313602363143/L110plti 3/ uU LOVCIL (Lemplate) a C at C Q A Enter name Juan Hello, Juan! run the program to ensure it works properly. An example of the program is shown below: C C {} 07 Task 1: The DebugThree3 class compiles without error. + Task 2: The getName() method accepts user input for a name and returns the name value as a string. Task 3: The displayGreeting() method displays a personalized greeting. Task 4: The DebugThree3 program accepts user input and displays the correct outout V bash + 用 4 ❤ O Layout: US 08 X
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education