Version: 4.1

2.4 ProfessorJ

The ProfessorJ languages are Java based languages designed for teaching and experimentation. There are four teaching based languages:

The remaining two languages support language extensions and experimentations:

Value printing can be either Class or Class + Field, selectable in the show details section of the language selection window. The Class printing style only displays the class name for any object value. The Class + Field style displays the class combined with the names and values for all of the class’s fields; when displaying a recursively defined object, any repeated object reverts to the Class style display for the second appearance. Languages with arrays may opt to always display an entire array or truncate the middle section of longer arrays.

All of the ProfessorJ languages support testing extensions, and tests are required within the teaching languages. The experimental languages, Full and Java + dynamic, allow the removal of these forms within the language selection window.

Programs in the teaching languages must be tested, using a class containing the word ’Example’ in the name and the ’check ... expect ...’ comparison forms. On run, all Example classes are instanstiated and all methods prefixed with the word ’test’ are run. When there are no tests, a warning appears in the interactions window; when all tests succeed, an acknowledgement appears in the interactions window; otherwise, a testing window appears to report the results. See View for details on configuring the report behavior. Tests can be disabled if necessary, see Scheme for details.

Unless disabled in the language configuration window, expression-level coverage information is collected during testing. Selecting the buttons within the report modifies the color of the program in the definitions window, to distinguish expressions that were used in the test from those that were not. Typing into the definitions window restores the original coloring.