Skip to content

jusqua/logical-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logical-calculator

It is a logical calculator made in Java to evaluate logical expressions

Usage

  • The operators and operands are comma (,) separated
  • The binary operators operate on the last two operands
  • The unary operators operate only on the last operand
  • The operators are reserved, therefore they are not used as operands
  • The false and true are reserved and operate like yours truth values
Operators Description
~ Negates
^ AND
v AND/OR
=> Conditional
<=> Biconditional
Operand Description
false Always False
true Always True

Exemples

Input Equivalent Expression Output
p,q,^ p ^ q undefined
false,~,p,v,true,^ (~false v p) ^ true tautology
p1,q1,v,~,p1,q1,v,^ ~(p1 v q1) ^ (p1 v q1) contradiction
s,t,~,v,s,t,=>,<=> (s v ~t) <=> (s => t) undefined
a,~,b,v,a,b,=>,<=> (~a v b) <=> (a => b) tautology

Members

About

Middle Project for University's Object Oriented Programing Course

Topics

Resources

Stars

Watchers

Forks