Back to Homework

Back to Main Page

Homework 1

Java Software Solutions: Lewis and Loftus Programming Projects 1.2 and 1.3 pgs 56-57

1.1 Enter, compile, and run the following application:

       public class Test
       {
                  public static void main (String[] args)
                  {
                              System.out.println("An Emergency Broadcast");
                  }
       }

1.2 Introduce teh following errors, one at a time to the program from the programming
      project 1.1. Record any error messages that the compiler produces. Fix the
      previous error each time before you introduce a new one. If no error messages are
      produced, explain why. Try to predict what will happen before you make each
      change.

         o Change Test to test
         o Change Emergency to emergency 
         o remove the first quotation markin the string
         o remove the last quotation mark in the string
         o change main to man
         o change print to bogus
         o remove the semicolon at the end of the println statement
         o remove the last brace in the program

1.3 Write an application that prints, on separate lines, your name, your birthday,
       your hobbies, your favorite book, and your favorite movie. Label each piece
       of information in the output.

       (Example: Favorite Movie: Scarface )

What to turn in:

Place your answers to problem 1.2 in a text file named P1answers.txt
For problem 1.3, turn in a Java file ( .java ) named AboutMe.java

Note:
If you named your class for problem 1.3 something else than AboutMe, and you don't change both the name of the file AND the class statement at the beginning of your file, it won't compile. If it doesn't compile when your TA tries to run it, then you won't receive credit for that portion. Make sure you compile your file and that no errors are produced before you turn it in!

How to turn in:


Send ONE e-mail to the grader of your section with the following Subject format

CS1322 Section#: P1

so if I were in section G08, I would have the following Subject header:

CS1322 G08: P1

Click on the Link on the Homework page to get your grader's e-mail. You may compress your files to a zip format. Make sure somewhere in ALL your files (like in the comments) you include your name AND gt# ( i.e. gte945x ).

Send your submission from your acme account.

Copyright © College of Computing
Any unauthorized reproduction or use is strictly prohibited.