CSC 171
Homework 1
Assigned Sept. 4, due Sept. 18
- Fill out the class survey
on the Web.
- Read The
Joys (and Woes) of the Craft of Programming.
- Skim Adages
on Software Design and Development (I expect you to read all this
stuff eventually, at your own pace.)
- Write a few paragraphs on your reaction to the
above reading assignments, and turn them in by email
to Dr. Bloch. Be sure
to include your name!
- Programming:
- Download the
eval folder and the
FunWithStrings folder,
unzip them, and compile them (using BlueJ, as discussed in class),
to make sure they works as is.
- Make a copy of the file
FunWithStrings.java,
naming it FunWithStrings.java.backup.
You'll use this to recover if you
really mess up FunWithStrings.java in the following steps.
- Read the program and its output.
Experiment by making up different variations on the
statements and operations provided. Each time you make up a new
example,
- predict what answer you think it'll produce,
- try the example interactively (using the "eval"
project), and see
whether the computer produces the answer you expected. If not,
keep trying more examples until you can consistently predict
what the computer will do.
- Modify the FunWithStrings.java program to
include your example. Then compile and run the
FunWithStrings program, and see
whether the computer produces the answer you thought it
would. It should produce the same answer as when you tried the
example interactively.
Turn in your expanded version of the
FunWithStrings.java program, with your examples, along with a few
sentences about what you've learned.
-
Introduce some intentional errors into the
FunWithStrings.java program, one at a time, e.g.
mismatched parentheses, missing semicolon at the end of a
statement, misspelled variable names, misspelled function names,
missing commas, extra commas, mismatched {curly braces}, etc.
For each error, write down what you did and what
happened, then fix the error and make sure the program
compiles correctly before you introduce a different error.
Turn in this list of "what you did and what
happened."
Last modified:
Stephen Bloch / sbloch@adelphi.edu