In this class, the primary focus is to learn about Java and its different components and abilities. It is structured in a way where we take a day or two to take notes regarding a specific subtopic within Java (such as Boolean Logic or Arrays), and then we are assigned various exercises that allow us to practice the concepts we have learned. This makes it doable for CS students at all levels to develop a substantial understanding of this language. Additionally, there are side projects and competitions throughout our curriculum such as the coding of our personal websites (which you are reading right now), American Computer Science League, and Apps For Good, which will be kicked off soon. Below you can find some examples of the work we have completed in this course.
For this lab, we were tasked to create an illusion of curved corners by only using straight lines that start and end in equidistant locations from the origin on perpendicular sides of a rectangle. In other words, I needed to write code that would allow me to start a line x units down from the starting y-coordinate and the same x units to the left from the starting x-coordinate. This would allow me to create the bottom left corner, and I used the same strategy of equidistant beginning and ending points to create the other corners. I used a for-loop that would run as many times as I wanted lines to be drawn. After finishing the original four corners, I made another smaller rectangle inside the four curved corners to create another set of curves. My code and the final product are listed below:
I did not expect to increase my understanding of how federal taxes were calculated in a CS class, but this assignment did just that. For this lab, we were tasked with asking the user for their inputs regarding whether they were single or married, their individual or joint taxable income, and then using these two parameters and a table of how tax value is calculated based on the income to print out the result of their federal income tax. This lab challenged us to find an efficient way to calculate this tax based on the varying types of computation that need to be done based on different income brackets. Many, many if and nested if statements were used, as can be seen below. But the most gruesome part of this assignment was to manually check 25 different test cases to make sure the code was doing the math properly. Fortunately, we became much more appreciative of JUnit test cases, which Ms. Taricco taught us shortly after, following this experience.
Public transportation is a very beneficial public amenity that not only increases the transportability of citizens and commuters in the area but also significantly reduces gas usage and carbon dioxide emissions every year. However, it is often not used to its full advantage. In particular, for the WRTA, even though the fares are free for another year, there is a significant amount of routes and stops that can make it overwhelming for new riders to start utilizing the system, and there are also often delays and closures that may deter riders from relying on public transportation. As Worcester is such a busy city, the transit system can be especially helpful for people who do not own or can not afford a car, as well as people who do not want the hassle of driving and parking in the populated streets.
Therefore, our app's goal was to give users a better idea of the status of the buses at any given time. In particular, our minimum viable product (MVP) was as follows: 1) Map of bus routes and directions using Google Maps API. This will allow a user to plan a trip and determine what stops they will get on/off at, as well as what bus route to take. 2) Arrival times (and estimated remaining time left) of buses on specific stops on each route using API from the WRTA. This specific API uses an SMS messaging system that will be implemented into Android Studio so a user either supplies a stop number/name or pre-filled from the map in feature 1. 3) Alerts for line/stop closures or safety hazards are provided by user submissions. This will require the use of Firebase to store the data required.
The foundation of our app was built on Android Studio, which allowed us to utilize what we learned about Java during the past year. Additionally, we also incorporated three external sources: the Google Maps API for users to plan out their routes, the WRTA SMS message API which allowed us to display the estimated arrival time of the buses to the user, as well as Firebase Firestore to hold crowd-sourced alerts and updates about the buses. Finally, we utilized Firebase Firestore to gather feedback from users about the app as well.