|
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
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