Developed a Quadratic Math App using C# and WinForms

Developed a Quadratic Math App using C# and WinForms

Read this if you are struggling with Quadratics.

Background

I learned Quadratics last year (during virtual learning) and it was really fun but also somewhat difficult to grasp. At the time, I got so much homework I couldn't find time to code, but now my homework has been reduced and I get time to code.

I remembered my struggles from last year and wanted to help others who are struggling with quadratics. So I made this Windows Forms App (yes it's an exe file and Macs can't run it) that can solve quadratic equations in the format of \( ax^2 + bx + c \) and can help you practice them by generating a quadratic equation and allowing you to answer it.

About the project

This project is called the Quadratics Math App. In this app, you can solve quadratic equations you have and can practice with automatically generated ones.
It was fun learning Regex to help with the parts of it that needed pattern checking. It was also fun testing it. One challenge was actually implementing the quadratic-solving function as originally it was partially accurate. For example, if the quadratic had no solutions it still gave random decimals.

How it works

This is what the app looks like:

Quadratic App UI

App - Left Side

Quadratic App Left Side

This side of the app is the Quadratic Solver. You enter your \( a \) , \( b \) , and \( c \) values and it goes through the quadratic formula, \( x = \frac{-b\pm\sqrt{b^2-4ac}}{2a} \) , and returns your (usually) two results.

Did I mention? It live updates the equation you type, like this:

Live Update Feature

App - Right Side

Quadratic App Right Side

On the right side is the Quadratic Practice. You press the "Generate Problem" button

Generate Problem Button

And poof in the "Equation will be here" textbox

Equation will be here textbox

Your randomly generated equation appears.

Then you do the math, and you put in your answers in the "Ans 1" and "Ans 2" textboxes (take your fractions to convert them to decimals, and round to the nearest thousandths place).

Ans 1 and Ans 2 textboxes

Then press the "Submit All" button.

Submit All button

The code will go through the Quadratic Formula and finds the correct answers then compares them to what you submitted to tell you if you are right or wrong (it also tells you what the right answer is). It also allows one right and one wrong answer (so don't worry one wrong answer won't make the whole thing wrong). Consider this example below:

Quadratic Solver example

GitHub Source Code: https://github.com/saisiddhish/quadratic-mathapp
Note: This is Windows Forms (WinForms) application, and will only run on Windows OS.

Hope this helps your Quadratic Problems!

ย