These are the original instructions, as supplied by the publisher. If you are reading this text, then your course instructor has not modified these instructions for use at your institution. In particular, electronic submission of the lab forms will not be possible. Check with your course instructor how you should submit your work!
These labs are companions to the book "Computing Concepts with Java 2 Essentials". These exercises are designed to be carried out in a computing laboratory, or in home study, with a Java compiler to test programs and either a web browser to view the assignments, or simply a printout of the web pages.
Each lab has a few review exercises (marked R) and programming exercises (marked P). Instructors should feel free to select a subset of the exercises to match the lab schedule. Some of the review questions can be answered with or without a computer; some require the students to write simple test programs.
You need to ask your course instructor how to submit your lab work. Here are the most popular options:
Simply print out each lab (with the "Print" command of your browser), then fill in your answers with pencil and paper. However, don't write programs into the supplied boxes. That is, ignore the instructions /* paste program here */. Instead, print the programs out separately, clearly label them and attach the printouts. Submit your work in the usual way.
Simply print out each lab (with the "Print" command of your browser), then fill in your answers with pencil and paper. However, don't write programs into the supplied boxes. That is, ignore the instructions /* paste program here */. Simply save them to a floppy disk and attach it to the lab form.
Fill in the answers to the questions in the browser, but skip those questions that ask you to paste your code into the form windows. However, don't type programs into the supplied boxes. That is, ignore the instructions /* paste program here */. When you are done, click the "Send to" button. Email your programs to your instructor separately.
Fill in the answers to the questions in the browser, and use "copy and paste" to paste your work whenever you are instructed to /* paste program here */. When you are done, click the "Send to" button.
It is best not to use the same browser window for web browsing while you work on your lab form. If you move away from your form, it is easy to lose the work that you have already completed. If you do move away from the form, always use the "Back" button to get back to your lab. Never use the "Reload" button or another link to the lab page--that reloads a new form that has all entries blank, and your work is lost.
Decide whether you are interested in electronic submission of lab work.
Electronic submission has several advantages: It reduces printing costs in the labs. You don't have to read the students' handwriting. If you are ambitious, you can write scripts to automate some of the grading.
Of course there are disadvantages. Students with less computer experience may find it difficult to switch between the browser and the compiler. You, or a lab administrator, needs to put a "CGI script" on the web server and modify each of the lab HTML files to work with that script. This is not difficult but it requires familiarity with HTML and CGI scripting. Furthermore, there may be an increased risk of cheating.
If you are at all unsure, it is probably wise to err on the side of caution and use paper submission. Or you can give your students the choice. That way, you won't have to spend time supporting students with less computer experience.
You should then modify this file. Remove this section and the next. Remove all options from the preceding section that you don't want your students to use. Remove the note at the beginning of the file. If you do opt for electronic submission, the lab HTML files need to be modifed as well. That process is described in the next section.
Please note: This procedure is unsupported by the author and the publisher. If you do not have the expertise to carry out the following steps and perform your own testing and debugging, then neither the author nor the publisher will be able to assist you. Do not attempt these steps unless you are well grounded in HTML and CGI scripts.
You need to place a CGI script on your web server that can handle the form submission. The simplest handling is to email the form content to the instructor or grader. For this purpose, you would use an email script such as FormMail
Please note: You must use your own server. The Mathematics and Computer Science Department at San Jose State University cannot host your traffic, and you have no permission to use their server except for testing purposes. The mcsmail script is supplied as an example only and is unsupported by the author and the publisher.
Next, you need to edit each of the lab HTML files.
Each lab HTML file contains the following HTML code near the beginning of the file. You need to change the bold portions.
<FORM ACTION="http://www.mathcs.sjsu.edu/cgi-bin/mcsmail" METHOD="POST"> <TABLE BORDER="0"> <TR> <TD>Your name: </TD> <TD><INPUT TYPE="text" SIZE="20" NAME="username"></TD> </TR> <TR> <TD>Your email address: </TD> <TD><INPUT TYPE="text" SIZE="20" NAME="recipientaddr"></TD> </TR> <TR> <TD>Your student ID number: </TD> <TD><INPUT TYPE="text" SIZE="20" NAME="ID"></TD> </TR> </TABLE><INPUT TYPE="HIDDEN" NAME="useraddr" VALUE="email@example.com"><INPUT TYPE="HIDDEN" NAME="recipientname" VALUE="yourself since this form has not been customized for your institution"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="ccj Lab1"> <HR> <P><A NAME="#submit"></A>Once this form has been customized for your institution, you can use this button <INPUT TYPE="submit" VALUE="Send lab"> to send your lab work. Be sure to read the <A HREF="instructions.html">instructions</A> before starting your work.</P>
Do the following: