This is a short review of the previous weeks tasks. We will do two simple tasks, adding, and subtracting.
|
|
|
|
| (a) Main activity |
(b) Adding |
(c) Subtracting |
| Figure 1, Screens |
Please complete the following:
- There will be two activities, (i) Main activity, and (ii) Calculation activity.
- Main Activity:
- Will have two Buttons: Add and Subtract.
- One TextView with a fixed String, Result. 2.3. Another TextView to display the result.
- Calculation activity:
- One TextView displaying the operation it is doing.
- Will have two EditTexts to take Double inputs.
- One Button to calculate the result and get back to the main activity.
- Tasks:
- On Add Button clicked:
- Go to Calculation activity, and set the text of operation TextView to Adding.
- Take two inputs (Doubles).
- On Calculate clicked get back to the Main activity with the result and set the result to TextView for result.
- On Subtract Button clicked:
- Go to Calculation activity, and set the text of operation TextView to Subtracting.
- Take two inputs (Doubles).
- On Calculate clicked get back to the Main activity with the result and set the result to TextView for result.
__________________________________________________________
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.