Homework 1

Due Thurs Oct 28, 18:00


Exercise 1: (5 points)

The following code produces syntax error messages from the java compiler. Fix the problems.

public class Trouble {

    public static void main(String[] args) {
        System.out.Println(hello, world);
    }
}

Exercise 2: (5 points)

Write a program that will print a box, like this:
**********
* *
* *
**********

Name your class PrintBox and your source file PrintBox.java



Submit the following files to Anne (javaiscl (at googlemail.com)):
Trouble.java
PrintBox.java


Don't forget to add the following comment block at the top of your source files and fill in the information in red:
/**
* Course: Data Structures and Algorithms for Language Processing WS 2010/2011
* Assignment: (Enter the assignment, hw1 exercise1, for example)
* Author: (Enter your full name here)
* Description: (Enter a description of your program here)
*
* Honor Code: I pledge that this program represents my own work.
* I received help from:
* (enter the names of others that helped with the assignment, or
 * no one if you received no help)
 * in designing and debugging my program.
*/