Assignment 2
Home ] Up ] Assignment 1 ] [ Assignment 2 ] Assignment 3 ] Assignment 4 ] Assignment 5 ] Assignment 6 ] Assignment 7 ] Assignment 8 ]

 

Assignment 2a
Assignment 2b

 

NOTE:

Before you start doing any real coding, read the Java Coding Conventions, especially the section on Naming Conventions.

It is very important to start coding using the proper naming conventions -- they are not optional when it comes to using Java Beans, etc., so let's start using good habits early!

I will expect you to follow these conventions in all the code you submit to me.

There is one exception: The use of braces in section 7.2 Compound Statements. Their bracing conventions use the following form:

while (!done) {
    statement;
    statement;
}

I prefer the much more readable form:

while (!done) 
{
    statement;
    statement;
}

While you may choose to use the JavaSoft (aka K&R) convention in your personal code, I request you to use my preferred form in the code you submit for these assignments; I find the K&R convention much harder to read, and that adds unnecessary effort to grading assignments.

NOTE: Regardless of brace alignment conventions, I require you to indent statements consistently. Code that does something like:

while (!done) 
    {
    statement;
  statement;
   statement;
}

Is very hard to read, and is often associated with sloppy work. If I encounter this kind of inconsistent formatting, the grade will suffer!

NOTE: To ensure that your printer doesn't turn your nicely aligned statements as seen on the screen into something out of a horror show, you will probably need to set your editor (or IDE editor) to generate spaces in place of tab characters.  Most editors allow you to do that, and furthermore, set where your tab stops will be (I recommend every 2, 3, or 4 spaces, no more, or you'll tend to use too much horizontal space in your documents).

 

There are two parts to this assignment:

  1. A "Timer" Program
  2. Practice with Strings
 

This page was last modified on 02 October, 2007