Project 2 Milestone 2
- Alexandra Charland
- Nov 16, 2020
- 2 min read
For my Android app, MeanTime, I will be implementing a stopwatch and a table to record the average time it takes a user to complete a certain task.
MVP
The minimum viable product for my app contains the following: a text input to add a task; a spinner to choose tasks from an existing list; a stopwatch with buttons to start, pause, and end it (tutorial); and a table to store the average times recorded for each task.

Algorithm
Each task will be saved in a class with a corresponding average time and number of iterations. When the user adds a new task, the name of the task will be added to the list of tasks and be initialized with a time value of 0. When the user chooses an existing task, the previous average time value for that task will be stored in a temporary variable and will be used to calculate the new average.
The user can start the stopwatch by tapping the "start" button. The time will only be saved and reset when the user hits the "end" button. Once the user ends the stopwatch, the task will be added to the table with the recorded time, or an existing task in the table will be updated with a new average time.
The formula for updating an existing average time with new time data is
average_new = average_old + ((new_time - average_old)/iterations)Each task will be displayed in a ListView (table) in the format of "task name" and "average time", where users can view all the tasks with the average times. (tutorial)
When the user terminates the app, all the task objects will be saved in a SQLite database (tutorial) that I will use to populate the ListView when the app is reopened.
Prototype
Changes I've made to the visual aspects of my application included adding an extra set of 00's at the end of the stopwatch to show seconds elapsed instead of just hours and minutes. This was so that the user can get a sense that the stopwatch is working right after starting it. I've also simplified the interface by getting rid of the text input field displayed directly on the timer page and instead having it be displayed in a dialogue box if the user wants to add a new task. The user can access this dialogue box by choosing "add new task" from the spinner. I did this to save space on the timer page, but if the dialogue box doesn't work as intended then I'll leave the text input field there.
The user must select a task before the "start" button for the stopwatch is enabled. Afterwards, the user can "pause" the stopwatch to suspend the time, but in order for the time to be recorded the user must tap the "end" button. When this happens, the timer is reset and the new time is added/factored into the average time for that specific task and displayed in the table:
Comments