20 likes | 226 Views
1. Client enters equation a. Client enters first number b. Client enters add, subtract, multiply, or divide c. Client enters second number d. Client reports 2. Calculator system process answer a. Calc sys receives the equation b. Calc sys reads the numbers and operator
E N D
1. Client enters equation • a. Client enters first number • b. Client enters add, subtract, multiply, or divide • c. Client enters second number • d. Client reports • 2. Calculator system process answer • a. Calc sys receives the equation • b. Calc sys reads the numbers and operator • c. Calc sys does operation • d. Calc sys shows answer on display screen • 3. Client performs another operation • a. The number from the previous equation is used as the first number in the equation • b. Client enters a new operator • c. Client enters a number • d. Client reports • 4. Calculator system processes new equation • a. Repeat step 2 D. Divide C. Multiply B. Subtract A. Addition 1. Person enters value 2. Person presses addition key 3. Person enters second value 4. Person presses Report to indicate 2nd value finished 5. Computer performs calculation (Value 1 + Value 2) 6. Computer displays answer as new Value Divide and conquer!
Part of one possible use-case design Use case: Start calculator Actors: user, calculator 1. User starts calculator 2. Calculator stores zero in accumulator Use case: Enter first number Actors: user, calculator 1. User enters a number 2. Calculator stores number in accumulator Use case: Add Actors: user, calculator 1. User selects + 2. User enters number 3. calculator puts storage + number in storage 4. Calculator displays accumulator 5. Calculator puts add and two numbers in report Use Case: Multiply Use Case: Square root Use Case: Clear