0

Hi, I need some help with an assignment due in a few days. It asks me to draw a table using four functions, as well as a main function. The main program should call a char function LProp (3 variables), that calculates the truth-value of the logic expression for a given set of component truth-values. All char variables should take only the T for true and F for false. The LProp function should call char functions AND, OR, and NOT as needed.

I've already written the code for my AND, OR, and NOT functions using the variables, but what the heck am I going to do with my LProp function?

Am I supposed to create a manual table out of the truth table for p,q,r (my three variables), then continue by calling the lprop for the more complicated part of the expression? How do I stick these into my function? I am soo confused!

I understand how to create a nice-looking table, but I honestly don't know enough about Java to approach the Main or LProp functions with any type of rationality. Thank you in advance for the help. Ideas are very welcome.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by javaAddict
0

What the 3 variables of LProp stand for? If they are the 2 bool values and the which method to call then have an if statement checking what is the 3rd input and call appropriately the reight method AND, NOT, ... with the first 2 arguments

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.