Questions


2.1: Define the scenarios where a nested class and package scope class are used.

2.2: Some people say that components need to be defined using interfaces. Explain why this statement may be true or false.

2.3: Design a calculator component using the Commons Bridge. Add some methods that would seem appropriate.

2.4: Extend the calculator component to include generic operations that are implemented outside of the calculator component. The calculator code knows only about the intentions of the extensions, not the implementation of the extensions. The idea is to be able to load an extension, use it, and then replace it when necessary with another extension. You will need to recode the calculator code when extensions are subbed in. A sample extension could be memory operations like M+ (Memory Add), M- (Memory Subtract), or MRC (Memory recall). The generic operations operate on the same data that the core calculator component operates on. This means if the core calculator component uses numbers, the extensions use the same numbers . Tie the extensions to the core calculator component using hard-coded references.

2.5: A new requirement is made to the calculator component. There are multiple variations of the calculator. Some people want a business calculator, while others want a scientific one. Rewrite the calculator component that implements all of the features defined in questions 2.3 and 2.4. Don't forget to name the component(s).




Applied Software Engineering Using Apache Jakarta Commons
Applied Software Engineering Using Apache Jakarta Commons (Charles River Media Computer Engineering)
ISBN: 1584502460
EAN: 2147483647
Year: 2002
Pages: 109

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net