CS1007
Fall 2001
Homework #1
due Tuesday 25 September 2001

last updated: Sat Sep 15 16:11:15 EDT 2001 (EIS)

goal. The goal of this assignment is to make sure that you know how to perform the basic operations in the programming environment which you will be using for the rest of the semester:

  1. creating/editing a program,
  2. compiling and running your program, and
  3. submitting your program, electronically and in hardcopy form.

1. create/edit. Create a program that outputs a recipe by writing it on the computer screen.

Your program should be a Java application.

Use the formatting tricks discussed in class so that your output is easy to read.
Your output should have two sections:
(1) ingredients
(2) instructions
The two sections should be clearly labeled.

Each instruction should be numbered. Each instruction should be described simply and should contain only one thing to do. If you are copying the recipe from a cookbook, this may mean that you have to divide some of their steps into multiple instructions for the purpose of this homework assignment.

A Java program consists of objects (ingredients) and actions (instructions), and each action must be described clearly and simply -- so keep this in mind when you create your recipe.

Here's an example:
Recipe for Boiled Water
-----------------------

Ingredients
-----------
2 C water
1   kettle

Instructions
------------
1. Pour the water into the kettle.
2. Set the kettle on the stove.
3. Turn the stove on "high".
4. It is done when the water is bubbling and steaming,
   so when that happens, turn off the stove.
Your program file MUST be named hw1<yourCUNIXusername>.java. For example, mine would be called hw1eis2003.java.
BE SURE TO NAME YOUR FILE USING ALL lower case LETTERS!!!

2. compile and run. Compile and run the program. If it doesn't compile or run properly, then check that you have typed in the code exactly as above and that you have followed the instructions for these steps exactly as described in class.

3. submit. You need to submit your program in two ways: electronically and hard copy. This process will be the same for all homework assignments for this course, so master it NOW.

  1. electronically.
    Follow instructions on the assignments page.
  2. hardcopy.
    (1) Print out the homework template cover page (http://www.cs.columbia.edu/~sklar/cs1007/hw-template.html), fill it out and STAPLE it to a hardcopy (print-out) of your program (the Java source code, e.g., the file named hw1eis2003.java).
    (2) Bring the cover page and hardcopy to class on the day the assignment is due.
    If you have several sheets of paper, make sure they are ALL STAPLED TOGETHER (folded edges and paper clips have a way of getting things mixed up...). Make sure your name is on all the papers you hand in!