In a compiler course, for example, students often build a compiler for a toy language. Substantial projects are common in graphics courses as well. Many of the interfaces can simplify the projects in these kinds of courses by eliminating some of the grunt programming needed to get such projects off the ground. This usage helps students realize the enormous savings that reuse can bring to a project, and it often induces them to try interface-based design for their own parts of the project. Interfaces and implementations are the focus of Princeton's sophomore-level systems programming course.
Assignments require students to be interface clients, implementors, and designers.
In one assignment, for example, I distribute Section 8.1's Table interface, the object code for its implementation, and the specifications for Section 8.2's word frequency program, wf . The students must implement wf using only my object code for Table . In the next assignment, they get the object code for wf , and they must implement Table . Sometimes, I reverse these assignments, but both orders are eye-openers for most students. They are unaccustomed to having only object code for major parts of their program, and these assignments are usually their first exposure to the semiformal notation used in interfaces and program specification.