Inspiration
Our inspiration came from our struggles with Purdue's discrete math computer science course also known as CS 182. This project was a way to get coding practice, study discrete math, and put our knowledge to practical use all in one.
What it does
This projects prompts a user to input a formatted string that represents a predicate expression. Then, it displays the truth table for the predicate expression, starting from the individual variables and expanding until it reaches the full inputted expression.
How we built it
This project was built using Java on IntelliJ.
Challenges we ran into
There were many mathematical concepts that are hard to code into our program. For example, parentheses would greatly alter the order of operations of how one evaluates a predicate expression.
Accomplishments that we're proud of
- Properly formatting the outputted table, with scroll bars if there are many cells
- Making the calculator able to handle any number of variables and any length expression
- Getting the table to hold the correct values
- Assigning and evaluating logical column headers for the table that reflect how someone would approach a truth table by hand
What we learned
- Learned more about java graphics options and panel/layout offerings
- How to convert predicate expressions into truth values, accounting for operator precedence
What's next for TruthTabler
- Add computation for parentheses
- Check string formation
Log in or sign up for Devpost to join the conversation.