Exercise Interval Timer Project
Track: Health and Wellness
Inspiration: One thing we can do to stay healthy is exercise. Especially during this pandemic, many people may not want to go out to a gym or fitness center to work out. I have decided to create an exercise interval timer to help those who prefer to exercise at home.
What it does: My project allows for one to input exercises and play a countdown timer for each exercise. When starting up, one can input an exercise name followed up with the number of seconds for the exercise. The user can continue to start the timer and the program counts down through all the exercises in order depending on the number of seconds inputted. After all the exercises are complete, the program starts again from the beginning and saves the previous exercises.
How it was created: I coded the program with java and Visual Studio Code as my IDE.
Challenges: The biggest challenge I faced was creating a functional timer. At first, I created a timer with importing Timer and TimerTask, but it only allowed me to use a timer once. Eventually, I found a much easier method from a YouTube video, which uses Thread.sleep(1000) to pause for 1 second.
Accomplishments: My goal was to at least create a functional interval timer that allowed the user to input a name and an integer for seconds. I was able to complete this while also adding additional features, like adding breaks, deleting exercises, and detecting invalid inputs.
What was learned: I learned how to create a countdown timer in java. I learned about ArrayLists and its methods. I learned how to use try and catch to prevent exceptions from stopping my code.
Future Plans: I am very happy with how my timer turned out, but I’d like to do more with it in the future. Currently, the program isn’t very appealing or convenient. Once I learn how to use GUIs, I plan on adding buttons rather than inputting characters to make it look better and be easier to use.
Built With
- java
- visual-studio-code
Log in or sign up for Devpost to join the conversation.