27: 28: 29: 30: 31: 32: 33:
<element name="SI-RESULT-MESSAGE"> <simpleType> <restriction base="string"> <maxLength value="128" /> </restriction> </simpleType> </element>
36: </element> 37: </schema>
Write a Java class JSimpleCalculator.java that implements the interface defined in ISimpleCalculator.java and provides a user interface for:
Specifying which computation (add, sub, mul) is desired.
Specifying the operands to the computation.
Displaying the result of the computation (can be an error). There is a great deal of flexibility in this part of the exercise. Some examples of
the types of user interfaces that can be implemented include: command-line interactive
(console-based), graphical, Java servlet (Web-based). A command-line interactive
interface was implemented for the solution. A screen capture of the interface is given
Fig. 9.5. Notice that a debugging mode is available to trace the various steps in the
process of exchanging XML between the Java and COBOL XML marshalling layers.