 |
CS 111 - Introduction to Computer Science
Homework #1 |
Due at the beginning of class 4. We will go
through the submission process together in class 4. Make sure you have
your complete README file, Hello.java, and HelloMe.java files together in the
same directory on our system beforehand.NOTE: For each assignment, you should submit not only the requested program files,
but also a simple text file called README.
README files are often used by
programmers to comment on the contents of a directory or give vital information.
Please make sure this plain text file is named "README", not "README.txt",
"readme", "ReadMe.txt", "Read
me.doc", etc. For each assignment, your README
file will contain:
-
The Honor Pledge:
"I affirm that I have upheld the highest principles of honesty and integrity
in my academic work and have not witnessed a violation of the Honor Code."
- Your name
- Your Gettysburg ID number (For department assignment purposes, your name
and Gettysburg ID number in combination constitute a digital signature of the
Honor Pledge.)
- Answers to written questions
-
Read Chapter 1.
-
Do the bash tutorial ("Getting started with bash at Gettysburg"),
Do the tutorial in one sitting so that you'll
be able to submit a transcript of your shell commands. NOTE: Following all
instructions will create a README file with evidence of your work, or add such
evidence to one if you've already created it.
-
In class on Friday,
we'll do the Eclipse Hello
World Tutorial together. You'll be submitting the Java file
"Hello.java" you create according to these instructions. If you
follow the tutorial instructions, you will find this file in your "hw1"
directory within your "workspace" directory.
The more you know of your work environment, the more efficient you will
be. A little time spent above and beyond these tutorials will likely
pay off significantly in the long run as a CS major/minor.
-
Create a separate Java application called
HelloMe.java
that prints "Hello, <name>!",
inserting your name for <name>. -
In your own words, define the terms:
-
compiler
-
interpreter
-
Java Virtual Machine (JVM)
-
What do the commands "
java" and "javac" have to do with the previous terms?
-
In your own words, describe these errors. When is each type of error
encountered in the programming process (e.g. editing stage, compilation stage,
execution stage, etc.)?
-
syntax error
-
logic error
If you'd like to submit your work before Monday this is the process we will use to submit work together in class 4 on Monday.:
- Get your README file, Hello.java, and HelloMe.java into the same
directory on our Computer Science filesystem (not on your personal computer). It doesn't matter which directory, but you'll probably find it most
convenient to submit from where you develop, e.g. ~/eclipse-workspace/cs111 .
- In your README, be sure you have your:
- Honor pledge
- Name
- Student ID number
- Answers to written questions
- Transcript of commands entered for the bash tutorial (or 3 new
things learned beyond the tutorial)
- Open a terminal window and change to the directory in our filesystemwith all of your
submission files, e.g. "cd ~/eclipse-workspace/cs111". The entire directory path should contain no spaces.
- Enter the command "submit111 hw1".
- Wait several seconds (usually not more than a minute).
- Check the generated feedback file feedback.txt using the command "less
feedback.txt". When using the "less" command, "q" quits, "enter"
advances a line, and "space" advances a page. The mouse wheel also
works.
- Note: You may submit your work up to 10 times. (Further
submissions will provide feedback, but will not be graded.) It is best to test
your work on your own before submission. Do not rely on the submission
system to serve as your testing software. Software testing is
a skill you should build in this class.
Rubric: (20 points total)
- 6 points: Bash
- tutorial path:
- all tutorial commands executed and evidenced in the README file
output of history command: full credit
- for every 3 tutorial commands missed, -1 point
- 2 points: (Eclipse) Hello.java correct output (including final newline character)
- 3 points: HelloMe.java correct output (including final newline
character)
- 3 points: Exercise 5 definitions, +1 point per correct definition in a
student's own words
- 2 points: Exercise 6, +1 point per correct relation of a command to a
previous term
- 4 points: Error descriptions, +1 point per correct error description, +1
point per correct error stage identification