Question: Write a subroutine in Java code that determines if a logical expression is an absurdity, contingency, or a tautology for the following: (1) p (
Write a subroutine in Java code that determines if a logical expression is an absurdity, contingency, or a tautology for the following:
(1) p
(q
p)
(2) (p
q)
p
(3) (q
p)
(q
~p)
(4) p
(q
p)
(5) q
(q
p)
(6) p
~p
(7) q
(~q
p)
Please write code and results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
