We want to make sure that we get off to a running start, and that any problems with compiling, accounts, submitting, etc. are taken care of right away.
The Head First Java is designed to be a hands on textbook. Typically, you'll want to have an editor and compile handy where you can try things out.
But, you can do this assignment, even if you don't have the textbook. By the time we get to Homework 2 (H02), that may no longer be the case, so get your textbooks.
In this assignment, you will:
You need to have your account properly configured for Java 5.0 to do the work for this course. See the following file for instructions:
The steps are on p. 9 of your textbook, but in case you don't have that yet, here they are:
Use emacs or vi to create simple "Hello World" style Java program. An example of such a program is on p. 9 of the HFJ textbook.
If you don't have the book yet, here's a link to the code.
You can also copy this directly from the file /www/htdocs/CIS/370/pconrad/07J/hwk/H01/MyFirstApp.java
Note that in Java, the name of the file must match the name of the class. Since the class in this file is called MyFirstApp
, you have no choice—you must call the file MyFirstApp.java.
class MyFirstApp {
to say class FooBarFum {
instead. Clear?Here's the complete sequence of command to set up a
/www/htdocs/CIS/370/pconrad/
corresponds to the web page http://www.udel.edu/CIS/370/pconrad > cd > mkdir ~/cisc370 > cd cisc370 > mkdir H01 > cd H01 > cp /www/htdocs/CIS/370/pconrad/07J/hwk/H01/MyFirstApp.java . > ls MyFirstApp.java > javac MyFirstApp.java > java MyFirstApp I Rule! The World >
Use the script program on strauss to make a script called h01.txt
(please use exactly that filename) where you
If you aren't familiar with how to script on strauss (because you took CISC105/CISC181 elsewhere, or you just need a refresher), see the following lab from the C++ intro course for help with that process. This lab also reviews some initial settings for your account that you may want to review:
Submit your work on WebCT for the assignment marked H01. Upload and submit BOTH
MyFirstApp.java
source file (or whatever you called it. Feel free to call it something else if you like.)Yes, I want you to submit both files, even though did a cat of the MyFirstApp.java
source is inside the .txt
file. If you need me to explain why I require this, I will.
Now read Chapters 2-4 for Thursday. As you read, you may want to apply the typo corrections from the errata to your book.
This assignment is to your grade, almost what the "free space" is when playing Bingo. So don't blow it—get 'er done.
In this assignment, I've given you some detail about what I expect in the script. I won't always do that though.
By now, you should know that the typical expectation for programming courses is this: list all your source code, show that it compiles, show that it works.
Sometimes "showing that it works" requires extra steps, including listing input files, output files, directories, etc., and running multiple times. I expect you to know that at this point in your CS education.