Computer Science

Class Description

Computer Science is a class taught by Mrs. Taricco here at Mass Academy. The course teaches students skills in a variety of CS related disciplines, including webstite development with html and CSS, Java, and app development. Another focus of the class is to foster algorithmic thinking and problem solving, which are important in any career. Collaboration is encouraged, and students often learn from each other to accelerate the learning process.

Bulgarian Solitaire

Bulgarian solitaire was one of my favorite assignments so far this year. It was one of the problems on our overarching assignment on the topic of ArrayLists, and in my opinion the most challenging. The premise of the challenge was to model a game of Bulgarian solitaire. In the game, N cards are randomly divided into some groups of random size. For example, a deck of 10 cards may be divided into groups of 1, 2, 2, and 5. One card is then removed from each deck to form a new group. For example, in the case above the new groups would become 0, 1, 1, 5, and 4. Since the group that had 1 card no longer has any cards, we can forget about that group. The game repeats until the size of the groups are counting numbers starting from 1 (1, 2, 3, 4…), assuming that N is a triangular number. I thought this challenge was interesting because it required multiple steps that could be programmed in many ways. My strategy was to determine a random number of groups and place the cards randomly into those groups. A while loop could then be used to perform each step and print the resulting array. Overall, it was an assignment that neatly tested the many different techniques we had learned in an enjoyable manner. Near the end of the year, I want to re-try the problem and see what optimizations I can implement.

Federal Taxes

I love federal taxes, by which I mean the lab Federal Taxes. The lab required us to determine the federal income tax of a person depending on their marital status and income. While working on the assignment, I noticed that there were two main topics of interest: conditionals and data test cases. To complete the lab, the tax brackets for federal income tax needed to be hard coded using conditional statements. This taught me how to eliminate redundancies in the usage of conditionals, as some strategies could be used to combine certain conditionals. The more important part of the lab, in my opinion, was learning how to record data test cases. Since there were so many conditional statements, it was important to run through an extensive list of test cases to properly evaluate the program. I learned that it is often smart to check border values, extreme values, and extraneous values to best find flaws in code. This lab was important because it enabled me to build good habits by setting the precedent for standard testing practices.

Apps for Good

The Apps for Good project was an opportunity to design and build an app to solve a problem in the community. We worked in small groups over the course of D term in order to create and test the app in Android Studio. The project was a great opportunity to learn Android app development and solve a problem we were passionate about.

Problem: Meal planning for families is a difficult, time consuming process. Each family member has different dietary restrictions and preferences, which makes it difficult to select recipes that accommodate the needs of an entire family.

Objective: The objective of this app was to allow the user to create profiles for each member of their family and input their dietary restrictions. The app should then be able to use an algorithm to sort and display information about recipes that accommodate all the requirements from a database.

Target Audience: This app is primarily targeted to families who are living together. This app is also targeted to a general audience of anyone who lives together and has little time to plan meals.

Minimal Viable Product (MVP): The app should allow a user to create multiple profiles and suggest filtered recipes using inputted restrictions.

Algorithm: For the MVP, the app accepts a list of allergies as restrictions. A list of ingredients that cannot be consumed by each allergy is used by the algorithm to filter any recipes that cannot be consumed by users in the family with certain allergies.

Flowchart of App Structure

Future Extensions: In the future, our group plans on implementing a saved recipes feature, where the user is able to select and store recipes for later use. After receiving feedback from the app fair, we also plan on adding a feature where users can edit and rate recipes. Other future extensions include increasing the size of the database, adding more options for dietary restrictions and preferences, and creating a grocery list for the user.