Question

Debugging Exercise 1-2 → 0 https://ng.cengage.com/static/nb/ui/evo/index.html?SBN 9781337397094&nbid=1402525&snapshotid=1402525&id=607855236& CENGAG


1 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1
public class DebugOne2 {
    public static void main(String[] args) {
        System.out.println("Java programming is fun.");
        System.out.print("Getting a program to work ");
        System.out.print("can be a challenge ");
        System.out.println("but when everything works correctly.");
        System.out.println("It's very satisfying");
    }
}

Output:

Java programming is fun. Getting a program to work can be a challenge but when everything works correctly. Its very satisfyi

Add a comment
Know the answer?
Add Answer to:
Debugging Exercise 1-2
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Debugging Exercise 10-2

    Debugging Exercise 10-2 

  • // 2. Practice debugging this program. It has approximately 22 compiler errors, 1 logic error and...

    // 2. Practice debugging this program. It has approximately 22 compiler errors, 1 logic error and //1 usability error. Identify them all. import java.util.scanner; //This program finds the average of three input values. public class Arithmeticx { public static void main( String [] args ) // declare variables double number1, number2, number3; // input data scanner in = newscanner( ); System.out.print( "Number 1? " ); System.out.print( "Number 2? " ); System.out.print( "Number 3? " ); number 1 = in.nextDouble; number...

  • Debugging Section Exercise #1 50 points Plus up to 10 points extra The following pseudocode contains...

    Debugging Section Exercise #1 50 points Plus up to 10 points extra The following pseudocode contains errors. You must find 3 or more errors in each of the following programs. If you find more than 3 mistakes, you will earn extra credit points. This pseudocode should determine the rental fees for cars Standard cars rent for $65 per day. compacts rent for $40 per day and subcompacts rent for $30 per day Rentals for at least 7 days receive a...

  • - Part 1 – 4 Debugging Exercises – there are things wrong – either logic or...

    - Part 1 – 4 Debugging Exercises – there are things wrong – either logic or syntax errors.  Correct the pseudocode and one Java program. Add the corrected code in BOLD and change the corrected color to RED.   Debugging 4:  Add the missing code in bold and red. import java.util.Scanner; public class Airline {             public static void main(String args[])             {                         Scanner s = new Scanner(System.in);                         String passengerName = ""                              String ageString = ""                           int passengerAge = 0                         System.out.println("Enter passenger's name: ");                         passengerName  =...

  • a) Why must a program specifically be compiled for debugging to be able to execute that...

    a) Why must a program specifically be compiled for debugging to be able to execute that program in a debugger? What two things does the compiler do to assist a debugger?

  • C++ Explain the fundamental principles of testing and debugging Please do not copy from a website!

    C++ Explain the fundamental principles of testing and debugging Please do not copy from a website!

  • LAB 2 SUBJECT: Algorithms, Compiling, Debugging Goal: Enter and compile a program. Write an algorithm (psuedo...

    LAB 2 SUBJECT: Algorithms, Compiling, Debugging Goal: Enter and compile a program. Write an algorithm (psuedo code) to calculate the shaded area of the object below Algorithm should be general: It should work for all values of A,B,C,D and different number of boxes (drawing below shows 3 x 3 shaded boxes and 1 x 1 white boxes). Do not assume A=B or C-D (as shown in the first diagram). Do not assume that the boxes are 3x3 and 1x 1....

  • Java debugging in eclipse package edu.ilstu; import java.util.Scanner; /** * The following class has four independent...

    Java debugging in eclipse package edu.ilstu; import java.util.Scanner; /** * The following class has four independent debugging * problems. Solve one at a time, uncommenting the next * one only after the previous problem is working correctly. */ public class FindTheErrors { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); /* * Problem 1 Debugging * * This problem is to read in your first name, * last name, and current year and display them in *...

  • 1 I You can print the values to stdout for debugging You are required to fix...

    1 I You can print the values to stdout for debugging You are required to fix all logical errors in the given code. You can click on Compile & Run anytime to check the compilation/execution status of the program. You can use System.outprintin to debug your code. The submitted code should be logically/syntactically correct and pass all testcases. Do not write the mainli function as it is not required. Code Approach: For this question, you will need to correct the...

  • Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not...

    Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not working. Describe each possibility in your own words. Define "precondition" and "postcondition" as part of your description. Create your own example of each possibility in Python code. List the code for each example, along with sample output from trying to run it.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT