a. DebugOne1.java
Explanation of Solution
Errors in the given program:
In the given program “DebugOne1.java”, there are two errors, they are,
- The block comment section is not closed in Line 3.
- The keyword “static” is missing in Line 4.
- The highlighted lines are the corrected statements in the given program.
Corrected Program:
// Class definition
public class FixDebugOne1 // Line 1
{ // Line 2
/* This program displays a greeting */ // Line 3
public static void main(String[] args) // Line 4
&...
b. DebugOne2.java
Explanation of Solution
Errors in the given program:
In the given program “DebugOne2.java”, there are two errors, they are,
- The print statements are given wrongly; the correct statement to print is “System.out.println”.
- The double quotes in print statement are missing in Line 8 and Line 10.
Corrected Program:
// Class definition
public class FixDebugOne2 // Line 1
{ // Line 2
/* This program displays some output*/ // Line 3
public static void main(String[] args) // Line 4
{ // Line 5
// Display the statement
System.out...
c. DebugOne3.java
Explanation of Solution
Errors in the given program:
In the given program “DebugOne3.java”, there are two errors, they are,
- The main method is not defined properly, the square brackets “[]” is missing in String function.
- The print statements are given wrongly;
- In Line 6, the letter “l” should be typed instead of “1”.
- In Line 7, the letter “i” should be typed instead of “1”.
- In Line 8, the letter “S” should be in uppercase instead of lowercase “s”.
Corrected Program:
// Class definition
public class FixDebugOne3 // Line 1
{ // Line 2
/* This program displays some output*/ // Line 3
public static void main(String[] args) // Line 4
{ ...
d. DebugOne4.java
Explanation of Solution
Errors in the given program:
In the given program “DebugOne4.java”, there are few errors, they are,
- In the main method in Line 3, the “static” keyword is misspelled.
- In Line 4, the “JOptionpane” class is misspelled, it should be “JOptionPane”.
- In Line 4, the parameter “nul” in “JOptionPane” class is misspelled, it should be “null”.
Corrected Program:
// Import the package
import javax.swing...
Trending nowThis is a popular solution!
Chapter 1 Solutions
EBK JAVA PROGRAMMING
- Find the error: daily_sales = [0.0, 0,0, 0.0, 0.0, 0.0, 0.0, 0.0] days_of_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] for i in range(7): daily_sales[i] = float(input('Enter the sales for ' \ + days_of_week[i] + ': ')arrow_forwardFind the error: daily_sales = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] days_of_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] for i in range(6): daily_sales[i] = float(input('Enter the sales for ' \ + days_of_week[i] + ': '))arrow_forwardWhat are the steps you will follow in order to check the database and fix any problems with it and normalize it? Give two references with your answer.arrow_forward
- What are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Consider that the database offline is not allowed since people are connected to it and personal data might be bridged and not secured. Provide three refernces with you answer.arrow_forwardShould software manufacturers should be tolerant of the practice of software piracy in third-world countries to allow these countries an opportunity to move more quickly into the information age? Why or why not?arrow_forwardI would like to know about the features of Advanced Threat Protection (ATP), AMD-V, and domain name space (DNS).arrow_forward
- I need help to resolve the following activityarrow_forwardModern life has been impacted immensely by computers. Computers have penetrated every aspect of oursociety, either for better or for worse. From supermarket scanners calculating our shopping transactionswhile keeping store inventory; robots that handle highly specialized tasks or even simple human tasks,computers do much more than just computing. But where did all this technology come from and whereis it heading? Does the future look promising or should we worry about computers taking over theworld? Or are they just a necessary evil? Provide three references with your answer.arrow_forwardWhat are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answerarrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning