LABS AND MINI-LABS
There are two categories of labs in the series.
These labs would be appropriate in courses on web page development, broad overview ("CS 0") courses, or elementary programming courses.
Lab Entrance Assignment: Create a home page, read about HTML tags.
Notes: You will need to give your students pointers on how they should edit HTML source files on your system. If they are creating web pages on personal computers and then publishing them to web servers, this is also the time to give pointers on how transfer their files from their personal computers to a server on which they have an account.
The cgi script needed for this lab is in the ProgLab1 directory (guestbook.pl). You will need to install it in the appropriate cgi directory for your system (or any computer on your campus that supports cgi scripts). Before you install it, you should edit the @referers line (line #15) to list the computers that your students would be using.
Notes: If your students are creating web pages on personal computers and then publishing them to web servers, remind them to transfer their files at the end of each mini-lab.
window -> document -> form -> form objects
Goals: Immediate practice with if statements, if-else statements, and logical expressions. Introduce the built-in Date object.
Prerequisites: Syntax for if and if/else statements; statement blocks. Comparison operators, logical operators and logical constants.
Lab Entrance Assignment:
Programming Lab 2: Implementing an "Expert System" (actually a simple decision tree)
Goals: Start a new program from scratch. Design a user interface. Use concepts introduced earlier: form elements, functions, events, variables, decision statements, and string concatenation. Explore decision trees.
Prerequisites: Decision trees, Mini-Lab 3.
Notes: You will need to cover decision trees before the students work on the Lab Entrance Assignment. If you decide to have the students complete the programming project below, which extends the program developed in the lab, then it is important that the decision trees be complete binary trees. The requirement to the students that "all answers are on the same level" is actually a stricter requirement than necessary, but easier to explain.
There are three example programs in the ProgLab2 directory that you may show your students, if that is helpful to explain the goal of the lab (and the first programming project, if you decide to use it).
You may need to tell/remind students how to create a new web page from scratch (e.g., File->New->etc.).
Goals: Immediate practice with constructing arrays and accessing array elements.
Prerequisites: Array concept; syntax for indexing arrays; range of valid array indices, functions to create arrays; "new", "this", "length".
Goals: Explore array representation for complete binary trees. Use concepts introduced earlier: constructing and using arrays, event handlers, and if statements. Become familiar with documenting functions.
Prerequisites: Programming Lab 2 and Mini-Lab 4.
Notes: This project is a continuation of Programming Lab 2. If you decide to use it, you will need to customize it to your own situation (for example, change the due dates and the references to our web server in the Tips file). For this reason, the link to the programming project in the main index.html file is currently commented out. There is also a solution program in the ProgProj directory, whose permissions you may want to change to thwart prying eyes.
Goals: Immediate practice with for loops and stepping through an array.
Prerequisites: Looping concepts; syntax for while loops and for loops (especially for loops); using loops to step through arrays. Review of logical expressions.
Lab Entrance Assignment:
Programming Lab 3: CD Order Form
Goals: Understand the selection sort algorithm and be able to fill in missing expressions in a selection sort implementation. Know how to swap two items in an array. Use debugging statements to test parts of a program before going on to the next phase. Use concepts introduced earlier: loops, arrays, variables.
Prerequisites: Mini-Lab 5.
We have also provided a completed form of the algorithm for your own use. You may wish to alter the permissions on this file to prevent students from previewing the solution.
Goals: Apply understanding of the selection sort algorithm to sort by a different characteristic. Coordinate data in a user form and an internal array in a synchronized fashion (update the array based on information in the form and update the form based on information in the array). Use concepts introduced earlier: arrays, loops, sorting, event handling, parameter passing, submitting forms.
Prerequisites: Programming Lab 3.
Notes: This project is a continuation of Programming Lab 3. If you decide to use it, you will need to customize it to your own situation (for example, change the due dates and the references to our web server in the Tips file). For this reason, the link to the programming project in the main index.html file is currently commented out.
You may find it useful to print and copy all of the labs and mini-labs as a hard-copy lab manual for your students. At Kalamazoo College, we do this at the beginning of the quarter and require students to buy it at the bookstore for the price of the copying.
If you would like to see the context in which we offer these labs, including the lecture notes for the "mini-lectures" that precede the mini-labs, the web page for our entire course is
The amount of time the labs require will depend on many things, including the background of your students and whether the labs follow one another consecutively or you have the students working on other exercises in between. At Kalamazoo College, classes meet three times a week for one hour and fifteen minutes. Students also meet in a closed lab for two hours, once a week. We integrate the mini-labs into our lecture time; we introduce the topic in the first 20 minutes or so, and then the students work on the mini-lab in pairs for approximately 40 - 50 minutes. The programming labs are scheduled during our weekly closed lab time, and we allow students the full two hours. Students may work on the programming labs individually or in pairs.
A paper about these labs, "Using Web Page Development to Teach Programming Concepts," was published in The Journal of Computing in Small Colleges, Vol. 13, No. 5 (May 1998). The associated presentation given at the Third Annual Northeast Conference of the Consortium for Computing in Small Colleges is available online at http://max.cs.kzoo.edu/CCSCNE/.
Please send comments to Alyce Faulstich Brady: firstname.lastname@example.org.
Alyce Faulstich Brady (email@example.com)
Kelly Schultz (firstname.lastname@example.org)
R.C. McDowell (email@example.com)