Question: s = The food is spicy. e = Jose will eat it. ( s e ) ( e s ) 1. Write the logic statement
s = The food is spicy.
e = Jose will eat it.
( s e ) ( e s )
1. Write the logic statement in English.
2. Write the logic statement in JAVA using if statements.
3. Write the logic statement in JAVA using no if statements (hint look through the laws or propositional logic)
Example:
a = Ana likes dogs.
p = Ana pets the dog.
p (p a)
Written out in English: Ana pets the dog, or Ana pets the dog and Ana likes dogs.
Written out in JAVA:
p | (p & a)
Shortest possible code in JAVA:
p
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
