It's time now to take some of the features covered in this chapter and apply them to
MovieMan. The code listings here will, unfortunately, be incomplete in the interests of keeping the page count down. However, the complete implementation can be found in the
Chapter03/MovieMan directory of the downloadable source code.
MovieMan menus are implemented as a small set of classes:
DisplayMenu. We could debate composition versus inheritance, or the use of classes to implement such simple menus, but my priority is to provide a demonstration of D features.
To get started, save a file called
$MOVIEMAN/source/movieman/menu/menu.d. At the very top, add the following lines:
module movieman.menu.menu; ...