═══ 1. Title page ═══ Calculator Part for IBM Smalltalk and VisualAge Product Description Brochure Copyright (C) - 1995 by DB Technologies, Inc. - Object Technology Group All rights reserved. April 18, 1995 PRELIMINARY INFORMATION ═══ 2. Trademarks ═══ VisualAge is a trademark of the IBM Corporation. ═══ 3. Description ═══ The Calculator Part is a VisualAge Part designed to provide an easy-to-use, reusable, and extensible component for the construction of sophisticated software calculator objects. The Calculator Part is a non-visual part by design. By placing a core calculator engine in a non-visual part, it was possible to increase functional flexibility and logically separate the calculator engine from the calculator user-interface. As a result, a wide variety of different user-interfaces can be wrapped around the same core calculator engine to accommodate virtually any user-interface specification. ═══ 4. Flexible user-interface ═══ One of the initial design-requirements of the Calculator Part was the ability to provide software emulation of a hand-held calculator and to present it as a familiar user-interface object for use in VisualAge applications. A further requirement was that the user-interface portion of the calculator had to be customizable by the VisualAge developer. The Calculator Part had to be able to provide the VisualAge developer with the ability to construct a user-interface which would emulate any hand-held calculator available on the open market (Hewlett Packard, Texas Instruments, Casio, Sharp, etc.). Additionally, the developer had to be able to construct entirely new calculator objects which may be functionally similar to conventional hand-held calculators, yet uniquely different and targeted for specialized use (an example of which would be a lung-mechanics calculator used by respiratory health care professionals). While the typical hand-held calculator is a familiar object, it is a procedurally oriented device which requires the user to perform a precise number of sequences in a predetermined order. This interface can, at times, be quite cumbersome. For this reason, the Calculator Part had to accommodate other types of user-interfaces such as form based user-interfaces. An example of two very different user-interfaces for calculating compound interest are shown in Figure 1.0. The two different user-interfaces illustrated in Figure 1.0 are wrapped around the same core calculator engine (FinancialCalculator Part). Figure 2.0 illustrates the Form based user-interface in the design environment. Figure 3.0 shows the more conventional hand-held calculator user-interface in the design environment. To assist the VisualAge developer in constructing calculator part user-interfaces, several composite visual parts are included in the Calculator Part package. These parts are intended to reduce the amount of work required in creating hand-held calculator type user-interfaces. They can be inherited and extended upon by the VisualAge developer. The following descriptions illustrate a few of these parts (additional parts will ship with the release version of the product): ═══ 4.1. Basic Numeric Keypad Part ═══ The Basic Numeric Keypad Part is a composite visual part that represents the basic numeric keypad found on most hand-held calculators. VisualAge developers can instantiate a Basic Numeric Keypad Part and connect it to a Calculator Part during the design of their calculator user-interface. This saves the developer time and effort during user-interface design work. Figure 4.0 shows a Basic Numeric Keypad Part connected to a Calculator Part in the VisualAge design environment. ═══ 4.2. Basic Operations Keypad Part ═══ The Basic Operations Keypad Part is a composite visual part that represents the basic operations keypad found on most hand-held calculators. VisualAge developers can instantiate a Basic Operations Keypad Part and connect it to a Calculator Part during the design of their calculator user-interface. This saves the developer time and effort during user-interface design work. Figure 5.0 shows a Basic Operations Keypad Part connected to a Calculator Part in the VisualAge design environment. ═══ 4.3. Basic Memory Keypad Part ═══ The Basic Memory Keypad Part is a composite visual part that represents the basic memory keypad found on most hand-held calculators. VisualAge developers can instantiate a Basic Memory Keypad Part and connect it to a Calculator Part during the design of their calculator user-interface. This saves the developer time and effort during user-interface design work. Figure 6.0 shows a Basic Memory Keypad Part connected to a Calculator Part in the VisualAge design environment. Additional composite visual Parts are also available in the standard product package. Individual extentions of the above mentioned Parts are available for the FinancialCalculator and the ScientificCalculator Parts. ═══ 5. Architecture ═══ The core calculator engine (Calculator Part) can be inherited and extended by the developer to add functionality. The basic product distributed by DB Technologies, Inc. currently consists of three different variations of the core calculator engine packaged as Calculator, FinancialCalculator, and the ScientificCalculator. At the lowest level of functionality is the Calculator Part. It consists of the basic calculator functionality (keyboard input, result and status display output, and basic mathematical operations such as addition, subtraction, multiplication, and division). The FinancialCalculator Part inherits all of the functionality present in the Calculator Part and adds special financial features to it (compound interest, annuity calculations, amortization calculations, etc.). The ScientificCalculator Part inherits all of the functionality of the Calculator Part and adds advanced functions to it (trigonometric functions, logarithmic functions, factorials, number base conversions, etc). All of the Calculator Parts Calculator, FinancialCalculator,and the ScientificCalculator consist of four main functional modules which collectively constitute the core calculator engine: Display Output Module(s) Keyboard Input Module Arithmetic/Logic Unit (ALU) Module Memory Module A functional block diagram of the core calculator engine is illustrated in Figure 7.0. ═══ 5.1. Calculator Part Public Interface ═══ The Calculator Part has the following public interface: The following information will describe the Calculator Part's public interface in relation to the core calculator engine functional block diagram: ═══ 5.2. Display Module ═══ The Calculator Part's Display Module consists of two attributes, displayValueString, and statusDisplay. Usually label objects are connected to these two attributes to provide the user-interface portion of the calculator display. Two Actions (clearAll and clearDisplay) belong to the core calculator engine's Display Module. ═══ 5.3. Keyboard Input Module ═══ The Calculator Part's Keyboard Input Module consists of several Actions which provide input to the Calculator Part's Display Module. The Calculator Part's keyboard input Actions consist of: The Calculator Part's Keyboard Input Module receives input via these Actions. It automatically updates the calculators displayed value when any one of these Actions are invoked. Usually these Actions are invoked when a user-interface button object is clicked. Figure 8.0 shows the typical connection: ═══ 5.4. Arithmetic Logic Unit (ALU) Module ═══ The Calculator Part's Arithmetic Logic Unit (ALU) Module consists of several Actions which provide the mathematical functionality of the core calculator engine . The Calculator Part's ALU Actions consist of: The displayValue attribute is a part of the ALU Module (its string representation- displayValueString attribute is part of the Display Module). The ALU Module is the portion of the Calculator Part which is extended the most in derived parts. The above mentioned Actions define the minimum of functionality in the core calculator engine. ═══ 5.5. Memory Module ═══ The Calculator Part's Memory Module consists of several Actions which provide the stored memory facilities of the core calculator engine . The Calculator Part's Memory Module Actions consist of: The memoryValue attribute is the single unit of storage present in the Calculator Part. It provides storage of a single floating point value. Derived Parts usually provide extensions to the core calculator engine's Memory Module if needed. Statistical features provided in the FinancialCalculator and the ScientificCalculator Parts extend the Memory Module via Smalltalk Collections. ═══ 6. Conclusion ═══ All calculator parts can be extended and packaged as reusable VisualAge Parts. Each of the core calculator engine's four functional modules (Keyboard Input, Display Output, ALU, and Memory) can be extended as well. The ALU module is frequently extended to add mathematical functionality. DB Technologies, Inc - Object Technology Group. is presently fabricating an additional Display Output Module which will add graphic plotting facilities to the Calculator Part. The graphic plotting output module will be available in the first release of the product. The Calculator Part was developed entirely with IBM VisualAge version 2.0. and is therefore compatible with all IBM Smalltalk and VisualAge supported platforms. ═══ 7. Additional Information ═══ Revisions to this document, sales materials, technical data sheets and other product information will be made available through the DB Technologies, Inc. sales department as it becomes available. Product information will be available in on-line form (Information Presentation Facility format) and circulated on various information networks. The Calculator Part product is scheduled to enter Beta testing beginning May 1, 1995. You may contact DB Technologies, Inc. to request Beta site privileges.