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!

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 1DE
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage