Class Work (CS 312) 11 Jun 2012

In your Unix home directory create a subdirectory called Java. All your Java programs will be in that directory organized by chapters.

Inside the Java directory create a subdirectory called ch1. This subdirectory will contain all the programs from Chapter 1 from your book.

Write the following programs from Chapter 1 in your book and get them to work.

These programs have to be completed before class on Wednesday, 13 Jun 2012. Do not turn them in. They will not be graded.

Use a text editor to create the programs. Compile and run them on the command line. Indent by two spaces and vertically align all your curly braces.

Do this:
if ( x > 5 )
{
  a = b + c;
}

Not this:
if ( x > 5 ) {
  a = b + c;
}

Learn the rules of Master Mind and play the game. Come up with your own strategy of winning the game. Here is an easier version of Master Mind.