When the pandemic struck, millions of people worldwide were obliged to stay at home and abandon their outside lives. People who had spent most or all of their time outside to pursue their interests were clueless as to what they would do inside. They needed someone or something to recommend activities based on their current interests. There are activity finders available online, but these usually do not take specific inputs in order to recommend the most fitting activities for a particular person—many are simply lists of activities sorted into categories.

Our project, the Activity Finder, is the solution to all these issues. It is an interactive, intuitive app that takes a person’s interests and preferences in many categories and recommends activities based on them.

Furthermore, the Activity Finder is also relevant outside the scope of the pandemic. It can be used by adults who feel consumed by their work and are in need of an exciting use of their time, by prospective college students looking to discover academic and non-academic extracurriculars, by people who want an enjoyable way to meet their goals, or even by someone who just wants to try a new hobby. It is online and easily shareable, so anyone can use it if they have access to the Internet. The Activity Finder is meant for all ages, since the prompts are simple and given one by one.

What it does

The concept is simple: the program asks the user for inputs to a few questions (such as “What are your interests?”), finds the activities that fit the most of the responses, and displays them along with their accuracy, a description, and links to other resources. These suggestions can be anything from obscure sports to specific internships to birdwatching in a nearby park, depending on what the user is requesting. The Activity Finder is therefore applicable in a number of different circumstances, whether they are as trivial as boredom, or as important as finding activities to shape your life and career.

The prototype attached does not provide details such as hobby descriptions or links, because we did not have time to implement these aspects. However, our algorithm functions successfully and is able to return the top picks based on the user’s responses.

How we built it

We built our program using Java and a number of text files, all contained on the website Replit. Some text files correspond to each question and contain the answer choices, while others contain the activities applicable to a particular choice. For the visuals, we displayed each component on a JPanel in a JFrame. We used JTextFields to display the prompts, and an ArrayList of JRadioButtonMenuItems to display each set of answer choices. Using a Scanner to traverse text files, we were able to name each JRadioButton the corresponding answer choice. Then, for each category, we created a class that implements ActionListener. We gave each JRadioButton its own listener, which would record the responses and add/remove visual components to show the next prompt. This allows the app to have multiple “steps” or “pages.”

We used ArrayLists to find and sort the activities based on how common they are within the text files. Finally, we combined and printed information about the recommended activities and their relevance.

Challenges we ran into

We ran into many hurdles along the way, from formatting issues to unending lists of error messages. Our first major challenge was figuring out what algorithm to use to select the best activities for the user, because we had several different ideas. For example, we initially thought of an algorithm involving the Choices class, but we eventually decided it would be more efficient to use text files.

Our biggest troubles came from the visual aspects, which we all had less experience with. In particular, adding and removing the buttons and text in the correct order took imagination and experimentation. Our goal was to display the buttons and text in the center of the screen. We tried a number of different layouts since many presented issues. Finally, we discovered that trying to just show and hide the buttons and text disrupted the formatting, and that removing the buttons and text was necessary instead.

Accomplishments that we're proud of

First and foremost, we are proud that our search algorithm works, giving the top activity suggestions no matter what combination of preferences users give. This shows that the algorithm will be effective for the final product as well. Furthermore, though our project is still a prototype, it demonstrates a useful application that can take many final forms.

We are also very proud that our application is interactive, intuitive, and versatile. It would help people of all ages, in a variety of different situations, and is easy to use.

Finally, we are proud of our visual components, which gave us the most trouble while building the program. We were able to use all visual components in conjunction by setting up methods within the ActionListeners to affect both the JTextFields and the JRadioButtons. The JRadioButton class was new to us, but we found that we could create an ArrayList of JRadioButtonMenuItems and add them to a JPanel, which simulated a menu and therefore displayed all answer choices at once.

What we learned

Through this project, we used features that none of us had heard of, such as JRadioButtons and JRadioButtonMenuItems. Through our research and experimentation, we also learned about JComboBoxes, JOptionPanes, and ItemListeners. Furthermore, we explored adding/removing visual components to make a multi-step program (which we had no experience with). Finally, we gained new experience in making comparisons between user inputs and data in text files, learning about which methods of implementation worked and which did not.

Additionally, each of our members had used some visual aspects of Java before but all of us had forgotten the specifics. Through this project, we were able to refresh our memories on how exactly JPanels, Layouts, Listeners, try-catch blocks, and so forth worked.

What's next for the Activity Finder

Since our current design is only a prototype, there are a number of ways we aim to improve our application.

Some additions include having more questions to make recommendations more individualized, making the questions optional so users can decide what's important to them, increasing the number of recommendations given to give the user more choice, and changing the style of the app from using multiple-choice questions to using a keyword search that would allow for answers more specific to the user.

Furthermore, we would make the program more user-friendly by changing the design and including more information about the recommended activities, such as a brief description and locations where you can do the activities.

Finally, we would make the Activity Finder an app that you can download onto a device so that people can experience its benefits more easily.

Built With

Share this project: