Homework Solution: va Load default template.. 1 public class MovieQuoteí 2 public static void main(String args) 4 6 /The +between the Strings is c…

    Overview In the last lab, we learned the basic structure of a Java class as well as some debugging skills. Now it is time to put that knowledge to use and fix up the code in the ZyBooks editing window. Debugging Practice In the develop section, try to compile the code and use the error messages to fix the discrepancies in the code. It would also be useful to read the comments scattered throughout the code. In Java, comments are denoted either with a //where the comment starts and goes until the end of the line or with /*commentary that goes here between the asterisks and slashes*/. They should be used to add clarification to code when necessary. Practice With Formatting Output Now that the code compiles without any errors, try submitting your code. You'll notice, you don't get points because the format of the output is different than the expected. The Java language is not dependent on whitespace (new lines, spaces, tabs, etc.) but you should still be aware that these things will still matter when dealing with Strings. Within double-quotes, whitespace does matter. So the String "my fair lady" and the String " my fair lady" are treated as completely different. Some highlights in terms of formatting output: System.out.print() vs System.out.println(): println will start a new line at the end while print does not Some basic escape characters: t adds a tab in the String n adds a new line in the String " adds a double quote to the String With this as a starting point, format the output of your code to match the expected output. 58 ACTIVITY 1.3.1: Lab1b Due Sep-12 0/5 MovieQuote.java Load default template.. 1 public class MovieQuoteí 2 public static void main(String args) 4 6 /The +between the Strings is called a concatinator and works to combine the Strings together System.Out.print(Someone I once knew wrote that + we walk away from our dreams; //Note the  allows the to be printed as part of the string system.out.printlnCafraid that we may fail or worse yet, afraid we may succeed. //The spaces before the quotation mark do not matter, though it does make the code messier System.Out.PrintLn 7 -William Forrester) 9 H
    58 ACTIVITY 1.3.1: Lab1b Due Sep-12 0/5 MovieQuote.java Load default template.. 1 public class MovieQuoteí 2 public static void main(String args) 4 6 /The +between the Strings is called a concatinator and works to combine the Strings together System.Out.print(""Someone I once knew wrote that" + " we walk away from our dreams"; //Note the " allows the "to be printed as part of the string system.out.printlnC"afraid that we may fail or worse yet, afraid we may succeed." //The spaces before the quotation mark do not matter, though it does make the code messier System.Out.PrintLn 7 "-William Forrester) 9 H

    Expert Answer

     
    public class MovieQuote { public static void main(String[] args)

    Overview

    In the decisive lab, we scholarly the basic constituency of a Java tabulate as well-mannered-mannered as some debugging skills.

    Now it is term to spdecipher that apprehension to right and plant up the order in the ZyBooks editing window.

    Debugging Practice

    In the clear minority, aim to calm the order and right the deception messages to plant the discrepancies in the order.

    It would too be rightful to decipher the referable attributable attributable attributable attributable attributablees unbound throughextinguished the order. In Java, referable attributable attributable attributable attributable attributablees are denoted either with a //where the referable attributable attributable attributable attributable attributablee set-outs and goes until the object of the cord or with /*observation that goes here betwixt the asterisks and slashes*/. They should be rightd to supplement straining to order when requisite.

    Practice With Formatting Extinguishedput

    Now that the order calms externally any deceptions, aim submitting your order.

    You’ll give-heed-to, you don’t attain summits becaright the format of the extinguishedspdecipher is irrelative than the expected.

    The Java phraseology is referable attributable attributable attributable attributable attributable attributable relying on whitespace (fantastic cords, spaces, tabs, awe.) beside you should quiescent be apprised that these things conciliate quiescent stuff when traffic with Strings.

    Within envelop-quotes, whitespace does stuff. So the String “my open lady” and the String ” my open lady” are treated as alconjointly irrelative.

    Some highlights in provisions of formatting extinguishedput:

    System.out.print() vs Rule.out.println(): stereotypeln conciliate set-quenched a fantastic cord at the object while stereotype does referable attributable attributable attributable attributable attributable

    Some basic elude characters:

    t supplements a tab in the String

    n supplements a fantastic cord in the String

    ” supplements a envelop referable attributable attributablee to the String

    With this as a set-outing summit, format the extinguishedspdecipher of your order to tally the expected extinguishedput.

    58 ACTIVITY 1.3.1: Lab1b Due Sep-12 0/5 MovieQuote.java Load fall-shorture template.. 1 general tabulate MovieQuoteí 2 general static wanting deep(String args) 4 6 /The +betwixt the Strings is determined a concatinator and works to attach the Strings conjointly Rule.Out.print(Someone I unintermittently kfantastic wrote that + we tread abroad from our dreams; //Note the  allows the to be stereotypeed as sever of the string rule.out.printlnCalarmed that we may fall-short or worse nevertheless, alarmed we may excel. //The spaces precedently the citation sign do referable attributable attributable attributable attributable attributable attributable stuff, though it does perform the order messier Rule.Out.PrintLn 7 -William Forrester) 9 H

    58 ACTIVITY 1.3.1: Lab1b Due Sep-12 0/5 MovieQuote.java Load fall-shorture template.. 1 general tabulate MovieQuoteí 2 general static wanting deep(String args) 4 6 /The +betwixt the Strings is determined a concatinator and works to attach the Strings conjointly Rule.Out.print(“”Someone I unintermittently kfantastic wrote that” + ” we tread abroad from our dreams”; //Note the ” allows the “to be stereotypeed as sever of the string rule.out.printlnC”alarmed that we may fall-short or worse nevertheless, alarmed we may excel.” //The spaces precedently the citation sign do referable attributable attributable attributable attributable attributable attributable stuff, though it does perform the order messier Rule.Out.PrintLn 7 “-William Forrester) 9 H

    Expert Vindication

     

    general tabulate MovieQuote
    {
    general static wanting deep(String[] args)
    {
    System.out.println(“”Someone I unintermittently kfantastic wrote that”+” we tread abroad from our dreams”);
    System.out.println(“alarmed that we may fall-short or worse nevertheless, alarmed we may excel.””);
    System.out.println(” -William Forrester”);
    }
    }

    Output: