+1 (229) 255-3712
glass
pen
clip
papers
heaphones

  

You are going to write in English and in short bits of code (written straight into canvas not in a separate JAVA file).

If the food is spicy then Jose will eat it and If Jose will eat it then the food is spicy.

1. What are the statements that makeup this compound? (2 points)

p =

q =

2. What is the logical form of the compound? (3 points)

3. Write the logic compound in JAVA (i.e. if statements, ternary operator…) (3 points).

4. Use the laws of propositional logic to determine a logically equivalent way to write the same logic in a shorter form (4 points).

5. Write the logic form you created in question 4 in JAVA using no if statements (4 points).

6. What did you learn by doing this project? Why do you think I wanted you to do it? (5 points)

Example:

Ana pets the dog or, Ana pets the dog and Ana likes dogs.

1. a = Ana likes dogs.

p = Ana pets the dog.

2. p ∨ (p ∧ a)

3. p | (p & a)

4. p (absorption law)

5. p

please write the answer here on study pool