Note that your personal web page (the one that comes up when you type in http://copland.udel.edu/~userid) can be anything you want. I will not require anything regarding that page, except that it has to exist. If you want it to be devoid of content, that is up to you.
However, you are required to have a web page that comes up at the following link:
http://copland.udel.edu/~userid/cisc181where userid is... well... your userid. To make that happen:
cd; chmod a+x .). (The "chmod" command is covered in Anderson chapter 6 as well.)
(Note: your home directory is the the one that has your user number on it; for example, pconrad's home directory is /home/usra/d9/55560. You can find anyone's home directory with the command finger userid)
index.html. (You'll use vi or emacs to create this file).
When you ask for a directory, but don't ask for any particular file, index.html is always what gets displayed first. (Sometimes, index.htm will do the trick as well, but index.html is a nicer name.)
What should that file have in it? Some HTML code for your personal CISC181 page (an example appears below.)
Again, for your "personal" CISC181 page, you may have any content you want, as long as it contains at least one link. The link is the part that has the <a href=...> tag around it (we talked this morning in lecture about what a "tag" is.)
Here's some example HTML to get you started.
<html>
<head>
<title>Joe Sample's Web page</title>
</head>
<body>
<h1>Joe Sample's Web page</h1>
I had to do this <b>web page</b> for my
<a href="http://udel.edu/~pconrad/cisc181"> CISC181 class</a>. Right now it is
pretty lame, but I hope to make it better later.
</body>
</html>
|
Here's what that looks like once it is formatted by a web browser:
Joe Sample's web pageI had to do this web page for my CISC181 class. Right now it is pretty lame, but I hope to make it better later. |
http://copland.udel.edu/~userid/cisc181
If it doesn't come up, make sure you set all your file permissions correctly. The most common problem is not doing the "chmod a+rx index.html" on the file to make it world readable. If you did that, and it still doesn't work, check with your TA or with a classmate for help.
public_html/cisc181 subdirectory, we need to also
create two more levels: a
public_html/cisc181/files level, and a
public_html/cisc181/files/lab00 directory. (Again, you'll use a series of "mkdir" and "cd" commands to accomplish this.) In
these two directory levels, we will NOT put any index.html
files. That way, when you go to it on the web with the command:
http://copland.udel.edu/~userid/cisc181/files/OR
http://copland.udel.edu/~userid/cisc181/files/lab00a directory listing will come up. You will put one file into the "files/lab00" directory, called "collegeDat.txt". It should follow the format we discussed in lecture this morning. Here is an example to follow:
University of Delaware udel Newark, DE Blue Hens 1743 |
chmod -R a+rx ~/public_htmlThat command says "recursively, set the public_html subdirectory of my home directory to be readable and executable by everyone". It basically makes the entire directory tree rooted at ~/public_html available. (Remember that command: it will likely be on the exam!)
Note: your lab00.cc, lab00.dat, and lab00.txt files do NOT go in your web space; only your collegeDat.txt file. Also, your collegeDat.txt file does NOT get submitted via WebCT.
You should notice a problem with the program. See if you can figure out why it does not compute reciprocals correctly, and then fix the program.
Once it is fixed, create a script called recip.txt of the corrected program that includes a program listing ("more recip.cpp"), a compile ("g++ recip.cpp", or "CC recip.cpp") and a run (./a.out).
Your TA will tell you whether he prefers you to hand this in on paper, or via WebCT submission.
For each of these exercises, you should complete the programming part. You are not required to complete the last section, labelled "Follow-up Questions and Activities". However, if you want to complete this, it would be a great way to study for future exams; I might take exam questions from these sections. If you do complete that part, you don't have to turn it in, but you can show it to your TA or to me during office hours if you want to know whether your answers are correct.
For each of the programs in this section, there is a partially completed program provided for you in the text. You don't have to type this in; instead, you can just copy it either from the web, at the following link:
http://copland.udel.edu/~pconrad/cisc181/04S/labs/lab01/or, you can copy it using the following Unix command, which will copy the files into your current directory (note the "space" followed by a "dot" at the end of the command; that is very important!)
cp ~pconrad/public_html/cisc181/04S/labs/lab01/*.cpp .For each of the programs, produce a script file where you
./a.out.) (See instructions below on how many times
is necessary.)
debugging01.cpp digits.cpp multiples.cpp numbercompare.cppso, name your script files:
debugging01.txt digits.txt multiples.txt numbercompare.txtSubmit these files by WebCT. If your TA asks for a printout, please also print them out and turn them in. (See lab00 instructions online for details of how to get printouts.) Be sure that your name and your section number appears in a comment inside each of your C++ programs!
(But... don't EVER include your student number in anything you submit; this leaves you open for identity theft! Just your name and your section number is sufficient.)
When demonstrating runs of a program for this class, or any computer science class, keep the following in mind.
If the program has different kinds of output
for different runs, be sure you include several runs that test the
different kinds of output. An example of that is the debugging
exercise on p. 31, where there are three different things the program
might do, depending on whether x < y , x >
y , or x ==y . In this case, your output should
test all three cases, which means three different runs of the program.
In this and all future labs, figuring out how many runs to do is
part of the assignment. Points may be deducted if you don't
show sufficient runs. Ask your professor or your TA if you are not
sure.
Note that you also need to keep the amount of output reasonable; showing 20 runs just to be "safe" when three would suffice is not reasonable.
Do your reading assignment (found on the Calendar in WebCT) and complete the "prelab exercises" in the Lab manual for Chapter 2 before coming to lab next week (2/25/04.)
Also, begin to think about how we might read the contents of collegeDat.txt into C++ variables.
In next week's lab, among other things, we'll look at all the other programs in A34 (Anderson, Chapter 34.) So if you want to get a head start, type in and run all of those. Of particular interest is "separate compilation", the topic of 34.11 through 34.17.
You might also begin to look at either Chapter 14 (vi) or Chapter 15 (emacs.) You'll be responsible on the exam for (at least) all the contents of either one or the other of these two chapters (you'll have a choice of vi questions or emacs questions; I'll try to make the questions as similar as possible.)