Computer Science 15-110, Lecture 9 (Sections M-Q), Fall 2009
Homework 1
Due: Thu 3-Sep-2009 at 11:59pm (email copy to your CA)
(no late submissions accepted).
Read these instructions first!
- This is not a lab and this is not
collaborative!
- You must work alone on this assignment
(except for help from CA's or the course instructor, who you are always
welcome to consult).
Then read these additional instructions!
- Getting started:
- Download
To start, copy this file to your hard drive:
Hw1.zip
- Extract
Extract the files to your hard drive (in a directory named "Hw1").
- Run DrJava
And not JCreator. Yes, you must use DrJava for this
assignment.
- Load Homework Project
Next, running DrJava (and not JCreator), select Project/Load, and
find the "hw1-drjava-project.xml" file in the Hw1 directory.
Hint #1: if you do not see it, you are probably using an older
version of DrJava. Download the most recent version in that case.
Hint #2: If you are on a Linux machine in 5419, don't forget this
hint: In DrJava's edit menu, open the preferences dialog.
Paste the following path into the "Tools.jar Location" field:
/usr/lib/jvm/java-1.6.0-sun-1.6.0.15.x86_64/lib/tools.jar
Apply the change, and close DrJava. When you re-open DrJava, it should
successfully find the compiler and work correctly. Each user should only
need to follow this procedure once ever.
- Sign
Next, be sure to include your name, andrew id, and section in a comment
on the first line of the file!
- Solve
And finally, edit/compile/run that file until it passes all the tests
(well, that's the goal, at least)
.
- Programming guidelines:
- Try to use well-named variables, proper
indenting, reasonable commenting, etc.
- Note: You may not use Java concepts we have
not yet covered, including loops (do/while/for), conditionals ("if"
statements or ternary operators (?:)), arrays, or methods from any
classes in java.util.* (besides Scanner or others we explicitly use) to
solve these problems (which isn't a problem for most of you, seeing as
we have not yet covered these!). While they may be helpful, every
problem here is solvable without them, and they are not permitted for
now.
- What to submit
- Do not submit the entire Hw1 directory!
Just zip up the "src" directory under Hw1, and submit the src.zip file
you create.
- How to submit
- Send an email with your src.zip
file as an attachment to your CA by the submission deadline. Do not
miss the deadline, even by one minute! Email problems are not a
valid excuse for late submissions.
- You should "cc" yourself in that email, too,
just to confirm that you properly sent the email.
- Note:
- Improper submissions will be penalized up
to 10 points and may be rejected.
- Late submissions will be rejected.
Carpe diem!