► |  | Dr Scheme: PLT Programming Environment

1 | Interface Essentials
2 | Languages
3 | Interface Reference
4 | Extending Dr Scheme
| Index

▼ | 2 | Languages

2.1 | Modules
2.2 | Legacy Languages
2.3 | How to Design Programs Teaching Languages
2.4 | Professor J
2.5 | Other Experimental Languages
2.6 | Output Printing Styles

Version: 4.1.4
top← prev up next →

#### 2.4`` ProfessorJ

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

- The ProfessorJ Beginner language is a small subset of Java, designed for novice computer science students. Each class must contain a constructor that initializes the class’s fields; each method must return a value.

- The ProfessorJ Intermediate language is an extension to ProfessorJ Beginner that adds full class-based inheritance and mutation. Classes do not require constructors and null values may arise.

- The ProfessorJ Intermediate + access language adds access controls, such as public or private, to member definitions and supports overloading constructor definitions.

- The ProfessorJ Advanced language adds arrays, loop constructs, and package specifications.

The remaining two languages support language extensions and experimentations:

- The ProfessorJ Full language supports most of Java 1.1 features, as well as a set of constructs designed for the development of unit tests

- The ProfessorJ Java + dynamic language extends the ProfessorJ Full language with a dynamic type and the ability to import Scheme libraries directly, for developing programs that use both languages.

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.

top← prev up next →