Web Page
Treasure Hunt is designed to make sure you know your way around the CS101
web pages, and call your attention to certain important items along the
way.
First, read Navigating
the CS101 Web Pages. Then, use the web to answer the following CS101
trivia questions. Write down the answers (handwritten on notebook paper
is fine).
-
When and where are the CS101 organized help sessions? (Hint: Look at the
help schedule.)
-
When and where are the CS101 instructor's office hours? (Hint: Look at
the CS101 home page.)
-
What overall percentage is required to earn an A+ in CS101?
-
How much time should you expect to spend on CS101? (Hint: Look at the Frequently
Asked Questions page.)
-
What are the email addresses for the head teaching assistants for CS101?
-
Name one reason why is class attendance so important in CS101. (Hint: Find
the Attendance Policy on the home page.)
-
According to the CS101 Collaboration Policy, would you be cheating if you
helped someone find an error in their program? (Hint: Read the examples
on the Collaboration Policy page.)
-
Up to two times during the semester, you can use a late coupon to turn
in a lab past the deadline by how many hours?
-
What is the definition of abstraction?
-
What is the due date for Lab 4?
-
Name two other schools teaching courses using Java. (Hint: Look at the
Java reference page.)
-
On the lecture notes page, what is the topic of the first lecture?
Part II: Getting Started with Java
-
Log onto a PC in Sever 201 or 203. (If you own a computer and want
to set it up
for CS101, read how
to set up your computer for CS101.)
-
Create a folder called CS101, in which to keep your lab assignments.
-
Click on the appropriate "Download Project" link in the online version of this assignment,
and extract the Lab0 project folder into the CS101 folder you just created.
Ask a TA if you need help. On CEC, you should save the file to your H:
drive. Then, in the Start menu under Utilities, open the WinZip application.
Finally, within WinZip open the file you downloaded and click on the
extract button in WinZip to extract the files into your CS101 folder.
[[[download
project folder for PC]]]
[[[view
project files for UNIX]]]
-
Click on the Start button and look under "Programming" to start up
Cafe 1.8.
Symantec Cafe is an Integrated Development Environment (IDE) for Java.
It's integrated in the sense that it is a single program that allows you to
open and
edit files in your projects, build (compile) your projects, and execute
(run) and debug your programs.
-
Pull down the Project menu and select "Open..." Open your copy of
the Lab0.prj project (inside your Lab0 folder).
-
Select "Open..." from the File menu and open the file called Startup.java.
At the top of the file is a comment block that identifies the file and
explains its contents. Fill in your name, lab section, email address and
today's date in the appropriate places. Every file you create should have
a header comment similar to this one.
-
Find the line that says "public void run()". Think
of this procedure as the starting point for your program. Notice that it
first opens a transcript file called transcript.txt, prints a
two-line message, and then closes the transcript file.
-
Type your name in the appropriate place in the message (replacing the XXX).
Save the file. Ask a TA if you need help editing or saving files.
-
Before you can execute a program, it must first be compiled (translated)
into byte code that can be executed by the Java interpreter. A program
that compiles a program is called a compiler. Compile your program
by selecting "build" from the project menu. An output window will appear
in which the Java compiler will print messages about the compilation. Whenever
you have compilation errors, they will appear in this output window.
If there aren't errors, the compiler will create some class files
that are the result of the compilation.
-
When compilation is successfully completed, run the program you just edited
by choosing "execute program" from the project menu. An execution window
will display the output from your program as it runs. Get help from a TA
if the program doesn't execute. Tip: As a shortcut, you
can click on the little picture of a running person on the Symantec Cafe
menu bar to compile and run your program all in one step.
-
Now open the file transcript.txt. You should see the output from
your program in the file. Print this file using the print command
in the File menu of the editor. Pick up your printed output from the printer.
See the FAQ
page if you have trouble finding the transcript file.
-
Side note: You may have noticed that there is another Java file called
Lab0.java, in your folder. We haven't said anything about
this file because you don't need to modify it. Its purpose is to
create a Startup object and start it running. Right now, don't be
concerned about understanding exactly how that works. We'll explain
later.
You now know the steps necessary to edit, compile, and run Java programs.
Please ask if you have questions about any of this. A word to the wise:
Remember to save your files often, and get into the habit of saving your
files onto a floppy disk after each lab session, just in case there is
a problem with the file server. Floppies may be purchased at the
CEC
help center.
Part III: Digital Portrait and Home Page
-
Ask one of the CEC consultants to take your picture during your lab section.
We will make it available electronically for you to put on your home page.
-
If you don't already have a home page on CEC, read How
To Create a CEC Home Page and follows the instructions. (Please do
this even if you already have a home page in Arts and Sciences or elsewhere.)
If you have trouble getting your photo to show up on your home page,
see the frequently asked questions page.
Part IV: Complete Your CS101 Registration
-
Read the CS101
Policy on Collaboration. In registering for this course, you agree
to abide by that policy and the academic integrity policy of the university.
If you do not understand the policy, please ask. If you do not agree with
the policy and cannot live according to it, then you should not take this
course.
-
If you haven't yet officially registered for CS101, be sure to do so as
soon as possible.
Part V: Physical Orientation
-
On the back of the piece of paper you used in Part I, write a clear, concise
procedure in English that describes, step by step, the process of
walking from Sever 201 (the PC lab) to
the instructor's office
(without walking outside).
Hint: On exiting Sever 201, turn right. The hallway will dead-end into
the 4th floor of Lopata. This map
of the School of Engineering and Applied Science may help you plan
your route. Walk the route and include landmarks along the way in your
written directions.
-
Find the CS101 Mailbox at the far end of the Lopata 4th floor hallway and
turn in Lab 0 (see below for what needs to be turned in).
What To Turn In:
For every CS101 lab you turn in, you should fill in a cover
sheet and staple it on the front of your lab. You can either print
out the cover sheet or pick one up from the stack on top of the CS101 mailbox. (If you print the cover sheet, use "print
preview" to check that it fits on one page. If it spills onto a
second page, decrease the font
size preference in your browser so that it prints as a single page.)
Attach the following items:
Part I: Your handwritten answers to any questions (or typed if you
prefer).
Part II: Your printed transcript file.
Part III: A printed copy of your web page, including your name and
your photo. If your web page takes more than one sheet of paper,
just print the first page with your name and photo on it. (If your
picture doesn't show up on your home page by the due date for this assignment,
turn in everything else, and then turn in your home page printout later,
once the picture does show up.)
Part IV: Nothing needs to be turned in, but be sure you are registered
for the course.
Part V: Your handwritten (or typed) directions to the instructor's
office.
Everything should be stapled together and turned in to the CS101 mailbox
in the Lopata 4th floor hallway before 2:00 p.m. on the due date.
Last modified 21:25:45 CST 13 January 1999
by Ron K. Cytron