Question

// Debug 10-1 find error in the code and re write it #c // Displays three...

// Debug 10-1 find error in the code and re write it #c

// Displays three message boxes

using System;

using System.Windows.Forms;

public class DebugTen1

{

   publis static void Main()

   {

      string caption = "Famous quote";

      MessageBox.Show(To be..., caption);

      caption += " continued";

      MessageBox("or not to be...", caption);

      MessageBox("That is the question", caption)

   }

}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

/* read (//) comment for errors below is error free program*/

using System;

using System.Windows.Forms;

public class DebugTen1

{

   public static void Main() // public

   {

      string caption = "Famous quote";

      MessageBox.Show("To be...", caption); // to be is constant come in quote

      caption += " continued";

      MessageBox.Show("or not to be...", caption); // show missing

      MessageBox.Show("That is the question", caption); // ; missing show missing

   }

}

/* OUTPUT */

/* PLEASE UPVOTE */

Add a comment
Know the answer?
Add Answer to:
// Debug 10-1 find error in the code and re write it #c // Displays three...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please help me debug this code. * Debug the error(s) and submit to the Dropbox *...

    Please help me debug this code. * Debug the error(s) and submit to the Dropbox * Please do not submit if it is not debugged * * NOTE: The output should display * * 2 to the power 8 is: 256.0 * */ public class DebugMeThree { public static void main(String[] args) { double answer = new Math.pow(2, 8); System.out.println("2 to the power 8 is: " + answer); } }

  • PLEASE HELP DEBUG THE FOLLOWING JAVA PROGRAM // Program displays some facts about a string public...

    PLEASE HELP DEBUG THE FOLLOWING JAVA PROGRAM // Program displays some facts about a string public class DebugSeven3 {    public static void main(String[] args)    {       String quote =         "Honesty is the first chapter in the book of wisdom. - Thomas Jefferson";       System.out.println("index.of('f') is: " + indexOf('f'));       System.out.println("index.of('x') is: " + indexOf('x'));       System.out.println("char.At(5) is: " + charAt(5));       System.out.println("endsWith(\"daughter\") is: " + quote.endswith("daughter"));       System.out.println("endsWith(\"son\") is: " + quote.endswith("son"));       System.out.println("replace('e', '*') is: "...

  • What am I doing wrong? I get this error: "The name 'LoginPasswordUserControl' does not exist in...

    What am I doing wrong? I get this error: "The name 'LoginPasswordUserControl' does not exist in the current context" I have a user control, here is the code: using System.Windows.Forms; //Define the namespace to make the user control. //namespace to hold the application namespace LoginPasswordUser { //Define the class to make the user control.   //Class to define the control   public partial class LoginPasswordUserControl : UserControl { //Define the read-only properties to get the username and the password from the user...

  • I'm working with Java and I have a error message  1 error Error: Could not find or...

    I'm working with Java and I have a error message  1 error Error: Could not find or load main class Flowers. This is the problem: Instructions Make sure the source code file named Flowers.java is open. Declare the variables you will need. Write the Java statements that will open the input file, flowers.dat, for reading. Write a while loop to read the input until EOF is reached. In the body of the loop, print the name of each flower and where...

  • Write the output of the two codes below, unless there is a compiler error or a...

    Write the output of the two codes below, unless there is a compiler error or a runtime error. In those cases, write ​CE​ or ​RE​, respectively, and explain why those errors occur. If the code produces an infinite loop, write “​LE:​ ​infinite loop​”. public class ForLoopsDemo{ public static void main(String[] args){ int x = 4; fint x = 4; for( int i = 0; i < x; i++ ){ } } for( int j = 0; j < 2*i+1; j++)}...

  • Write the program FindPatientRecords that prompts the user for an ID number, reads records from Patients.txt,...

    Write the program FindPatientRecords that prompts the user for an ID number, reads records from Patients.txt, and displays data for the specified record. If the record does not exist, display the following error message: No records found for p# using System; using static System.Console; using System.IO; class FindPatientRecords { static void Main() { // Your code here } }

  • Write the program FindPatientRecords that prompts the user for an ID number, reads records from Patients.txt,...

    Write the program FindPatientRecords that prompts the user for an ID number, reads records from Patients.txt, and displays data for the specified record. If the record does not exist, display the following error message: No records found for p# using System; using static System.Console; using System.IO; class FindPatientRecords { static void Main() { // Your code here } }

  • Please code using Java!!! What is Derivation, how a class C is defined as subclass of...

    Please code using Java!!! What is Derivation, how a class C is defined as subclass of the class B? a. Complete the code of main to have the output class One{ public One(){ System.out.println("A message from the class One: "); } } class Two extends One { . . . } // Driver class public class Questions { public static void main(String[] args) { Two obj2=new Two(); } } The output: A message from the class One:

  • Code using Java What is an interface? Complete the following code: interface IExample{ public void print();...

    Code using Java What is an interface? Complete the following code: interface IExample{ public void print(); } class Example1 implements IExample{ . . . } // Driver class public class Questions { public static void main(String[] args) { . . . } } To have this message when you execute it: Implementation of an interface

  • What is the output of the following code? public class Test { pub be static void...

    What is the output of the following code? public class Test { pub be static void main(String() args) { Object o 1 -new Object(); Object o2 = new Object(); System out.print((o1 = o2) + "" + (o1 equals(o2))); } } A. false false B. true true C. false true D. true false Analyze the following code. //Program 1: public class Test { public static void main(String[] args) { Object circle 1 = new Circle(); Object circle2 = new Circle(); System...

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