## Java Components for Mathematics

Version 1.0## Hobart and William Smith Colleges

## August 2001

## (Minor changes in source code and applets, September 2005,

to fix a problem with Variable and Expression input boxes

that arose in recent versions of Java.)## (Source code released under an MIT-style license, April 2012.)

THE "Java Components For Mathematics" project represents an effort to develop a framework of configurable mathematical software components written in the Java programming language. Our Java components are meant to be used on instructional Web pages as interactive illustrations, special-purpose calculators, support for exercises, and so forth. The components in Version 1 are mostly useful for calculus and pre-calculus and for science courses that use some of the same material. They use Java 1.1.

On this page, you will find links to source code, documentation, programming information, and sample applets, including a set of configurable applets that can be extensively customized without programming, using only applet params. There are also links for downloading the applets and source code.

All software developed for this project can be used in unmodified form for any purpose, including commercial uses, without charge. The Java classes that are part of the project can be freely used in other software. Modified versions of the classes can be created and distributed

subject to some restrictions, which are stated in the source code files.I am calling this release Version 1.0, but I am sure that it still contains a number of bugs. On September 9, 2001, I made some changes to the Web site, including changes to a few comments in the Java source code. However, no changes were made to any of the actual Java classes. Bug reports and other comments can be sent to David Eck (eck@hws.edu).

This project was supported by NSF grant number DUE-9950473.

## Configurable Applets

One of the products of the project is a set of configurable applets that can be used with no programming. These applets are configured using applet params. (There is also a separate set of basic applets that illustrate programming techniques.) The configurable applets cover a range of mostly calculus and pre-calculus topics including: graphs of functions, families of functions, composition of functions, tangent lines, parametric curves, and Riemann sums. To use these applets on your own pages, you will need the archive file jcm1.0-config.jar. To see the applets and documentation on how to use them, follow this link:

## Documentation

The JCM (Java Components for Mathematics) system is defined in the Java package edu.hws.jcm, which has four sub-packages: edu.hws.jcm.data, edu.hws.jcm.awt, edu.hws.jcm.draw, and edu.hws.jcm.functions. These packages, in turn, contain about 80 source code files. The components defined in this system can be assembled into useful applets with relatively little programming. The following documentation is available:

- Programming Information -- discusses the major Java classes in the system and explains how to use them.
- Basic Applets -- a series of sample applets with well-commented source code, meant partly as a JCM programming tutorial.
- Javadoc Documentation -- full API documentation in javadoc format, generated from the source code.
- Source Code -- browse the source code for the JCM classes and configurable applets directly.

## Download

You can download a copy of this entire web site onto your own computer. Alternatively, you could choose to download just the JCM source code or just the "jar" files that you need if you want to use the sample applets on your own Web pages".

If you have trouble downloading these by clicking on the links, try right-clicking and then selecting a "save" command from the pop-up menu.

- Download the entire web site in either of two formats:

- http://math.hws.edu/javamath/jcm1-web-site.zip -- JCM Web site in a ZIP archive.
- http://math.hws.edu/javamath/jcm1-web-site.tar.gz -- JCM Web site in a gzip-compressed tar archive.
- Download the JCM source code, including the sources for the configurable applets (but not the basic applets):

- http://math.hws.edu/javamath/jcm1-source.zip -- source code in a ZIP archive.
- http://math.hws.edu/javamath/jcm1-source.tar.gz -- source code in a gzip-compressed tar archive
- Download a JAR archive of compiled Java classes:

- http://math.hws.edu/javamath/config_applets/jcm1-config.jar -- JAR file with the configurable applets. (About 235K in size.)
- http://math.hws.edu/javamath/basic_applets/jcm1-basic.jar -- JAR file with the basic applets.
This archive omits the JCM classes that are not used in any of the basic applets.(About 150K in size.)

## Users

We would be very happy to hear from people who are using these applets on their Web pages or who are writing their own applets that use the JCM system. For now, here are a few examples. (Note added April 2012: This is old code; mostof the examples that used to be here no longer exist. The first example is a project that used code based on the JCM

- Calculus Applets, a web site by Thomas Downey that offers a wide range of applets for exploring ideas in calculus. The applets on this site use an updated and improved version of the JCM code, created by Downey and others, and available for download at http://calculusapplets.com/download.html. (Added April 2012.)
- Randall Pruim has written a Newton's Method applet.
- Mike May has posted some slightly modified JCM applets for use at Saint Louis University.
- Joan Remski, at the University of Michigan, has written an applet dealing with The Transport Equation. It uses some three-dimensional extensions of JCM components that she has written.
Added March 2002.

## Examples from project participants

(These examples are mostly based on development versions and earlier versions of JCM.)

- Kevin Mitchell has several data analysis tools based on an older version of JCM. He is using these tools for course taught as part of a term abroad program in Australia. Links to his Web pages for "Species Density,", "Species Area Relation," and "Shannon-Weiner Diversity " can be found at http://people.hws.edu/mitchell/oz.html
- David Eck used JCM applets in his Calculus I learning labs for Spring 2001. Links to all the labs can be found at http://math.hws.edu/eck/math130_s01/
- Jim Ryan has used JCM applets in his biology courses. Some examples can be found at http://math.hws.edu/javamath/ryan/ChiSquare.html, http://math.hws.edu/javamath/ryan/DiversityTest.html, and http://math.hws.edu/javamath/ryan/GameTheory.html

This project was supported by a proof-of-concept-level grant from the National Science Foundation. (You can read more about the grant here, including the text of the grant proposal.) This grant was awarded to Professors David Eck (eck@hws.edu), Kevin Mitchell (mitchell@hws.edu), and James Ryan (ryan@hws.edu) of Hobart and William Smith Colleges. Two students, Gabe Weinstock (Hobart '01) and Katie Kui (William Smith '01), helped prepare the JavaDoc documentation. Gabe Weinstock also worked on some of the Java classes, including RiemannSumRects and Grid.

David Eck, eck@hws.edu, August 2001, November 2005, and April 2012