How to Write Computer Assisted Test/Homework Questions

Please note that the following pages were lost and partially recovered, and therefore are (temporarily, I hope) filled with errors. Therefore, as you proceed, a note from you concerning errors would be greatly appreciated.
I can be reached at carl.david@uconn.edu. Thank you.
Carl David


Perl, CGI, HTML, CGI.pm Latex2HTML and Java among other things

This material is intended for persons who have seen the material on Computer Assisted Testing/Homework using the World Wide Web at Undergraduate Physical Chemistry Examination Questions or Graduate Physical Chemistryand want to write questions of their own. The Physical Chemistry questions referenced (above) are quite advanced, but one can get a flavor for the kinds of mathematical responses that students can give by looking at these examples, especially the first semester `Preliminary Material' questions. In this ``chapter'' you will find a host of problems approached in different ways, which consist of pre-college math and physics questions. I am attempting to provide an encyclopedia of CAT/H formats with the hope of enticing others into using these schemes for their students.

There is a second, alternative site, which covers freshman (elementary) chemistry. This site is under constant development also, and needs to be regarded as highly experimental in nature. Its address is:
Freshman Chemistry Examinations
and you are welcome to browse there also. However, be prepared for some difficulties, as we are attempting to implement Java chemical formula inputting, and experiencing some difficulties with this new scheme.

The material covered herein addresses elementary HTML, elementary Perl, use of CGI.pm as a Perl library for easy WWW programming, and lots of examples of question types which require mathematical answers. In addition, the use of Latex2html to create formulae using TeX and LaTeX in a natural way will be discussed. Finally, drawing tools for creating appropriate figures will be discussed.

This material is under constant revision, and is subject to additions (and corrections) as time allows. Any suggestions or corrections would be greatly appreciated.


This symbol, , means that the text is not yet ready for prime time. The "at work" symbol is, in a sense, redundant, since everything is "at work" as far as I'm concerned.

Tentative Table of Contents

  1. Introduction OK, III/4/02
  2. Preliminaries Hardware assumptions. OK III/5/02
  3. Perl 1 (Resources)Where, oh where, is Perl information located?
  4. Comments on Password FilesThe password discussion (below) is obsolete, and left in only for reading/writing interest. See this page to continue.
  5. Read a Student Password FileOK III/17/02
  6. Write a Student Password FileOK IV/17/02
  7. Read and Add to a Student Password FileOK IV/17/02
  8. Generating PasswordsOK IV/17/02
  9. Login Guest/Student(an example)OK IV/17/02
  10. Putting it Together, Files/Passwords/Choices(an example)OK IV/17/02
  11. Putting it Together, Files/Passwords/Choices(the Perl program)OK IV/17/02
  12. Implementing a Counter (the Counter Itself)OK IV/17/02 ???
  13. Implementing a Counter (the Perl Program)OK IV/17/02 Main HTML file for System (Try me. This will lead to a main_menu.pl and then to an example of a menu of either examinations or questions.)
  14. Keeping Random Variables constant During Answer Submission
  15. Regular Expressions, A Tutorial and Exercise Set of Pages
  16. Regular Expressions (the s-operator)
  17. Regular Expressions (the tr-operator)
    1. Regular Expression Testing This is the m-operator tester without the text!
    2. Regular Expression Testing via Replacement This is the s-operator tester without the text!
    3. Regular Expression Testing via Translate This is the tr-operator tester without the text!
  18. HOWTO's, a listing:
    1. Rounding Numbers and for loops
  19. Using FTP to move files about as needed between the development site and the server site.
  20. Using Latex2HTML to include equations properly
  21. Creating and Using Pictures in Questions
  22. Some Java Learning Materials. These materials were created using NetBeans, and employed the 1.4 release of Java, so, when they've gone on to Java 47, please be aware that most of this will be obsolete!
    1. Inputting Chemical Symbols Using Java (Actually, this is java 1.1, and no IDE used in its creation. A better version is coming, soon??????).
    2. Java 1.4 Examples using Swing
      1. (Simple) Java Usage of JScrollPane
      2. (More Complicated) Java Usage of JScrollPane
      3. Some Tree Examples
        1. primitive Java Usage of JTree
        2. primitive Java Usage of JTree and jScrollPane
        3. Java JTree, JScrollPane and Editable Leaves
        4. Java JTree, JScrollPane and Editable Leaves and Adding New Nodes
        5. Java JTree, JScrollPane and Editable Leaves and Adding and Deleting New Nodes
      4. Mouse Usage, In JScrollPane
      5. Combining Using JSplitPane
      6. Using JScrollPane for Text
      7. Using functions in two different classes and files
      8. Polarization Model Java and Maple coding as an example of symbiotic error minimization in programming Not ready yet.
      9. netBeans, Java, and JFreeChart, part 1
      10. JCCkit-NetBeans-Java-intro, part 1
      11. Applets, JApplets, and Computer Assisted Testing and Homework
        1. applet1 jTextArea jComboBox
        2. applet-employing a browser-part 2
        3. applet-employing a browser-part 3
        4. applet-employing native browser-part 3-jdic.pdf
      12. Simplest JavaBean possible with NetBeans
      13. Simplest JavaBean possible, NetBeans and Events
      14. Simplest JavaBean possible, NetBeans and JUnit testing
  23. Packages and Modules and Things Like That Not ready yet.
  24. Repairing (afterthoughts)
  25. C# programming Examples using Visual Studio
    1. C# starting out in Visual Studio
    2. C# A mouse driven keyboard to avoid keystroke logging
    3. C# conversion of bcyrpt.exe from commandline to windows application
    4. C# Namespace Utilization in Importing Code from Other Projects
    5. C# Inside Visual Web Developer; Starting Interactive Web Serving
Please address comments directly to me at the following address:
carl.david@uconn.edu or use your mailer to send me a message
or (snail mail):
Carl W. David
Department of Chemistry
University of Connecticut
Storrs, Connecticut 06269-4060
(203)486-3217 (voice)
(203)486-2981 (fax)