9.1: Create an extension that is a calculator scripting language. The language could be based on lines like the Java programming language, or the scripting language could be based on elements in an XML file. The complexity of the language and how it is defined is dependent on how energetic you want to be. The objective of this exercise is to convert the scripting language into a number of functors that are executed to produce a formula. Ideally, the scripting language should, at a minimum, be able to represent the royalty formula discussed at the beginning of this chapter.
9.2: As part of the ongoing calculator project, clean up the extensions and application to use wherever possible the classes ArrayUtils, CharSetUtils, BooleanUtils, ClassUtils, Enumeration, NumberUtils, RandomStringUtils, Serialization-Utils, StringEscapeUtils, SystemUtils, and WordWrapUtils. For those classes not used in the calculator project, create another project and define instances where those classes could be used.
9.3: As part of the ongoing calculator project, tidy up the classes and implement the methods toString, compareTo, equals, and hashCode .