Inspiration

Using JavaFX to develop a GUI for a Bookstore App as a final project for my OOP Analysis & Design course was very exciting. Using this newly learned framework to put my previous mathematical skills to the test was the next challenge I wanted to give myself. Using the concepts I learned in linear algebra and applying that to the concept of recursion that I had recently learned in the Data Structure and Algorithms course would also help me solidify my understanding of the framework.

What it does

This calculator lets you solve for variables in a square matrix that you enter...not by passing in whole arrays, but by interacting with the UI and separately typing in the numbers.

Disclaimer

These programs have been created to demonstrate my projects. They SHOULD NOT be used during EVALUATIONS and I am NOT responsible for ANY ACADEMIC MISCONDUCT charges landed on someone who uses them

How I built it

The functionality of this calculator directly depended on the method that calculated the determinant of the matrix that is passed in. It calculates this matrix by recursively calling itself if the number of rows and columns exceeds 2. Each time it calls itself, it passes in a smaller matrix - the left-over square matrix that prevails once the columns and rows are disregarded for each number in a row. That number is then multiplied by the output of this matrix and is given a negative or positive value based on its position in the row. Once the size reaches 2 x 2, the regular equation to find the determinant is carried out. Then as these solutions propagate backward, they are also added up to give the final determinant. This method is complemented by the method that switches the solutions of each equation by the variables' corresponding column. The front-end portion of this calculator was developed using JavaFX and its powerful methods and event handling capabilities.

Challenges I ran into

When creating the algorithm for finding the determinant, it became quite tricky to develop the procedure for the resultant matrix each time. However, documenting what was needed for me to solve was extremely helpful.

Accomplishments that I'm proud of

Using this newly learned framework and the concept of recursion to solve such a calculation-heavy problem

What I learned

Developing a better understanding of how to use frameworks to create better looking and functioning UI

What's next for Cramer's Calculator

Developing this simple calculator as a side project using this framework or the first time opens many new possibilities

Built With

Share this project:

Updates