Lab00, CISC181 (honors), Spring 2004

Welcome

Lab zero has three parts.

Part One: Orientation

The first part is to complete the lab zero from the regular section of the course, which can be found at the link given below, and also on the separate handout given to you by your TA. Except for the lab policies (which are slightly different for the honors section of the course, due to the smaller size of the class), that part of the lab is pretty much the same as for the regular section. So rather than copy it ( and have two places in which to fix any typos), here is a link to that part of your lab.

http://copland.udel.edu/~pconrad/cisc181/04S/labs/lab00.html

This part is mainly an "orientation session" for the Sun Rays, the C++ compiler, and the process of submitting things via WebCT. Get it done first. This part of the lab is worth 100 points, broken down just like in the handout for the regular section. (The entire lab00 will be worth 200 points.)

Part Two: Web Page

This part involves several commands to get both a "personal" web page up on strauss (if you already have one, you are already finished with that step), as well as a CISC181 specfic web page.

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/cisc181, where userid is... well... your userid. To make that happen:

  1. Create the subdirectory "public_html" under your main directory, and then the subdirectory "cisc181" under that. If you are not sure how, read up in your Anderson text, and/or ask your TA, or your classmates. I also went over this in lecture.
  2. Make your home directory "world executable". (A series of commands to do it: cd; chmod a+x .).
    (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)
  3. Go into the cisc181 subdirectory, and create a file called index.html.

    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. 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 CISC181 page</title>
      </head>
    
      <body>
        <h1>Joe Sample's CISC181 web page</h1>
    
        I had to do this <b>web page</b> for my 
       <a href="http://udel.edu/~pconrad/cisc181h"> CISC181 (honors) 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 personal web page

    I had to do this web page for my CISC181 (honors) class. Right now it is pretty lame, but I hope to make it better later.

  4. To see that it works, type into a web browser:
    http://copland.udel.edu/~userid/cisc181
    If it doesn't come up, check with your TA for help.

  5. Now go back and put an index.html file into your main public_html directory. It can have similar content, different content, or no content at all. That's completely up to you, since it is your "public face" on the web here at UD. It is not necessary to have a link into your CISC181 home page, but you can if you want.
  6. Now that you have a public_html subdirectory, and a 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. 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/cisc181h/files/
    OR
    http://copland.udel.edu/~userid/cisc181h/files/lab00
    a directory listing will come up. You will put one file into this 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
    
    Make sure you can see this file on the web. You might need a chmod command to fix it up so that folks have permission to see the file in a web browser. A useful command is:
    chmod -R a+rx ~/public_html
    
    That 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.

Part Three: Anderson Chapter 34

Read through Anderson Chapter 34, pp 383-386. Then, when you get to p. 386, type in recip.cpp (note that C++ files can end in either .cc, or .cpp), and compile it and run it.

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.

Finishing up: What to turn in for this lab

  1. Be sure that you have a printed copy of your three files: lab00.dat, lab00.cc, and lab00.txt (script file).. Hand these to your TA before leaving the room. If you are making up this lab, hand it to him on 2/18/04 during Lab01, or at the very latest on 2/25/04 during Lab02 (that should only be for students who for whatever reason, added the class late.)
  2. Be sure that you uploaded a copy of all three files to WebCT (lab00.dat, lab00.cc, and lab00.txt). Then, click submit to sent these to your TA.
  3. Be sure that you have complied with all the steps in the web page section, and also printed out a copy of your web page.
  4. Grading:

Next Steps:

Do your reading assignment (found on the Calendar in WebCT), and begin to think about how we might read the contents of collegeDat.txt into C++ variables.

Also, 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.)


Phillip T Conrad
Last modified: Thu Feb 12 15:54:21 EST 2004