Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Done in Java AND FALSE FALSE XOR TRUE FALSE AND FALSE TRUE OR TRUE TRUE AND TRUE FALSE XOR FALSE FALSE OR TRUE TRUE OR
Done in Java
AND FALSE FALSE XOR TRUE FALSE AND FALSE TRUE OR TRUE TRUE AND TRUE FALSE XOR FALSE FALSE OR TRUE TRUE OR TRUE FALSE XOR FALSE FALSE XOR FALSE TRUE AND TRUE FALSE AND FALSE FALSE AND TRUE TRUE NEGATE TRUE NEGATE TRUE XOR TRUE TRUE AND FALSE TRUE OR TRUE TRUE OR TRUE TRUE XOR FALSE FALSE OR TRUE FALSE XOR FALSE FALSE NEGATE TRUE NEGATE TRUE NEGATE FALSE OR TRUE FALSE NEGATE FALSE AND TRUE FALSE XOR FALSE TRUE OR TRUE TRUE OR TRUE FALSE XOR FALSE FALSE NEGATE TRUE NEGATE FALSE OR FALSE TRUE OR FALSE FALSE XOR TRUE TRUE NEGATE TRUE AND FALSE FALSE NEGATE FALSE NEGATE TRUE OR TRUE FALSE NEGATE FALSE OR FALSE TRUE XOR FALSE TRUE OR TRUE TRUE AND FALSE TRUE NEGATE TRUE NEGATE TRUE AND FALSE TRUE AND TRUE FALSE NEGATE FALSE NEGATE TRUE OR FALSE TRUE XOR TRUE TRUE OR TRUE TRUE XOR TRUE TRUE AND TRUE TRUE OR TRUE TRUE AND FALSE FALSE XOR TRUE FALSE XOR TRUE TRUE NEGATE TRUE XOR FALSE TRUE OR TRUE TRUE AND FALSE FALSE XOR FALSE FALSE OR FALSE TRUE XOR TRUE TRUE NEGATE TRUE AND TRUE TRUE NEGATE TRUE NEGATE FALSE AND FALSE FALSE NEGATE TRUE OR TRUE TRUE OR FALSE FALSE AND FALSE TRUE OR FALSE FALSE XOR TRUE TRUE XOR TRUE FALSE XOR FALSE FALSE XOR FALSE TRUE XOR FALSE FALSE NEGATE TRUE XOR TRUE TRUE OR TRUE FALSE OR FALSE FALSE OR FALSE FALSE NEGATE FALSE OR TRUE FALSE AND FALSE TRUE OR TRUE FALSE AND TRUE TRUE NEGATE TRUE XOR FALSE FALSE AND FALSE FALSE NEGATE TRUE NEGATE FALSE AND FALSE FALSE XOR FALSE FALSE XOR TRUE FALSE AND TRUE FALSE XOR FALSE TRUE AND FALSE FALSE OR FALSE TRUE AND TRUE TRUE XOR TRUE TRUE OR TRUE FALSE OR FALSE TRUE OR TRUE FALSE NEGATE TRUE AND FALSE FALSE OR FALSE FALSE OR TRUE FALSE XOR TRUE TRUE XOR TRUE FALSE NEGATE FALSE AND FALSE FALSE AND TRUE TRUE XOR TRUE TRUE XOR FALSE FALSE NEGATE FALSE NEGATE TRUE OR FALSE TRUE XOR FALSE TRUE XOR TRUE FALSE XOR FALSE FALSE XOR TRUE FALSE AND FALSE TRUE OR FALSE FALSE OR TRUE FALSE OR TRUE TRUE NEGATE TRUE XOR FALSE TRUE NEGATE FALSE OR FALSE FALSE XOR FALSE TRUE NEGATE TRUE AND FALSE FALSE XOR FALSE TRUE XOR TRUE TRUE AND FALSE FALSE XOR FALSE FALSE OR FALSE FALSE OR TRUE TRUE XOR TRUE FALSE NEGATE FALSE NEGATE TRUE AND TRUE TRUE NEGATE TRUE NEGATE TRUE NEGATE TRUE NEGATE TRUE XOR FALSE FALSE NEGATE TRUE NEGATE TRUE XOR TRUE FALSE NEGATE TRUE OR TRUE TRUE OR FALSE FALSE NEGATE TRUE NEGATE FALSE AND FALSE TRUE XOR FALSE FALSE OR FALSE FALSE AND TRUE FALSE NEGATE TRUE XOR FALSE TRUE AND TRUE FALSE AND FALSE TRUE NEGATE FALSE OR FALSE FALSE NEGATE FALSE AND FALSE TRUE NEGATE TRUE OR TRUE TRUE AND TRUE FALSE XOR TRUE TRUE XOR FALSE TRUE NEGATE FALSE XOR TRUE TRUE AND TRUE TRUE NEGATE TRUE AND FALSE FALSE AND FALSE TRUE NEGATE FALSE XOR FALSE TRUE XOR TRUE FALSE NEGATE FALSE NEGATE FALSE AND FALSE FALSE AND FALSE TRUE XOR FALSE FALSE OR FALSE TRUE NEGATE FALSE XOR TRUE FALSE OR TRUE FALSE XOR TRUE FALSE XOR FALSE TRUE AND FALSE TRUE XOR FALSE TRUE XOR FALSE FALSE OR TRUE FALSE AND FALSE TRUE NEGATE FALSE OR FALSE TRUE XOR FALSE TRUE AND TRUE FALSE NEGATE FALSE XOR TRUE TRUE XOR FALSE FALSE NEGATE TRUE AND FALSE FALSE NEGATE FALSE AND TRUE FALSE NEGATE FALSE OR FALSE FALSE NEGATE TRUE NEGATE TRUE NEGATE TRUE NEGATE TRUE OR TRUE FALSE NEGATE TRUE XOR FALSE FALSE AND TRUE FALSE AND TRUE FALSE OR TRUE FALSE NEGATE FALSE AND FALSE TRUE NEGATE TRUE XOR TRUE FALSE NEGATE TRUE AND TRUE FALSE XOR FALSE FALSE AND FALSE TRUE OR TRUE TRUE AND FALSE TRUE OR FALSE FALSE OR TRUE FALSE XOR TRUE TRUE XOR FALSE TRUE OR TRUE FALSE NEGATE TRUE XOR TRUE FALSE NEGATE FALSE NEGATE TRUE XOR FALSE TRUE OR TRUE TRUE NEGATE TRUE OR FALSE TRUE OR TRUE FALSE NEGATE FALSE OR FALSE FALSE XOR TRUE FALSE AND FALSE FALSE XOR FALSE FALSE AND FALSE TRUE OR TRUE TRUE AND TRUE TRUE XOR TRUE TRUE NEGATE TRUE XOR TRUE TRUE OR FALSE TRUE OR TRUE FALSE AND FALSE FALSE XOR FALSE FALSE OR FALSE TRUE NEGATE TRUE XOR FALSE FALSE AND FALSE TRUE OR TRUE FALSE OR FALSE TRUE NEGATE TRUE XOR FALSE TRUE XOR FALSE FALSE AND TRUE FALSE NEGATE TRUE OR TRUE TRUE OR TRUE TRUE XOR TRUE TRUE OR TRUE FALSE OR TRUE FALSE NEGATE FALSE NEGATE TRUE OR FALSE TRUE OR FALSE TRUE OR FALSE FALSE NEGATE TRUE AND FALSE FALSE AND FALSE FALSE NEGATE TRUE NEGATE TRUE NEGATE FALSE NEGATE TRUE XOR FALSE FALSE XOR FALSE FALSE AND TRUE FALSE XOR FALSE FALSE XOR TRUE FALSE XOR TRUE FALSE XOR TRUE TRUE OR TRUE FALSE OR TRUE FALSE AND FALSE FALSE AND TRUE TRUE AND FALSE TRUE XOR FALSE FALSE NEGATE TRUE NEGATE FALSE OR TRUE FALSE NEGATE TRUE NEGATE FALSE XOR TRUE TRUE OR FALSE FALSE NEGATE TRUE NEGATE FALSE NEGATE TRUE NEGATE TRUE OR FALSE TRUE NEGATE FALSE XOR TRUE TRUE AND FALSE FALSE OR FALSE FALSE AND FALSE TRUE OR FALSE TRUE XOR FALSE FALSE XOR TRUE FALSE XOR FALSE TRUE XOR TRUE FALSE AND FALSE TRUE AND TRUE TRUE AND TRUE TRUE XOR TRUE FALSE OR FALSE TRUE NEGATE TRUE AND TRUE FALSE AND TRUE FALSE OR TRUE FALSE NEGATE TRUE AND TRUE FALSE XOR TRUE TRUE XOR FALSE TRUE OR TRUE TRUE OR TRUE TRUE XOR FALSE TRUE NEGATE FALSE NEGATE TRUE AND TRUE TRUE OR TRUE TRUE OR FALSE FALSE XOR TRUE FALSE OR TRUE FALSE XOR FALSE FALSE XOR FALSE TRUE NEGATE FALSE NEGATE TRUE XOR FALSE TRUE XOR TRUE TRUE AND TRUE FALSE XOR FALSE FALSE AND TRUE TRUE XOR FALSE FALSE OR FALSE FALSE AND TRUE TRUE OR FALSE FALSE NEGATE FALSE XOR FALSE TRUE OR FALSE TRUE XOR TRUE TRUE NEGATE FALSE NEGATE TRUE OR TRUE FALSE NEGATE FALSE NEGATE TRUE XOR TRUE TRUE XOR TRUE TRUE NEGATE TRUE NEGATE FALSE XOR TRUE TRUE XOR FALSE FALSE AND FALSE TRUE XOR TRUE TRUE NEGATE FALSE XOR TRUE FALSE XOR TRUE FALSE NEGATE TRUE XOR TRUE TRUE OR FALSE TRUE NEGATE TRUE OR TRUE TRUE XOR FALSE FALSE AND FALSE FALSE OR FALSE TRUE AND TRUE FALSE AND TRUE TRUE OR TRUE TRUE XOR TRUE TRUE AND TRUE TRUE XOR TRUE FALSE NEGATE TRUE AND TRUE TRUE OR TRUE TRUE XOR TRUE FALSE NEGATE TRUE AND TRUE FALSE AND TRUE TRUE NEGATE FALSE XOR TRUE TRUE XOR FALSE TRUE NEGATE TRUE AND FALSE TRUE AND TRUE TRUE XOR FALSE FALSE OR TRUE TRUE OR TRUE TRUE XOR TRUE FALSE AND FALSE TRUE NEGATE FALSE XOR FALSE TRUE AND TRUE TRUE OR FALSE FALSE NEGATE TRUE OR TRUE FALSE OR FALSE FALSE OR TRUE FALSE AND TRUE FALSE OR FALSE FALSE AND FALSE FALSE AND FALSE FALSE OR FALSE FALSE XOR FALSE FALSE NEGATE FALSE NEGATE TRUE OR TRUE FALSE NEGATE TRUE OR TRUE TRUE XOR FALSE TRUE OR FALSE FALSE AND TRUE FALSE OR TRUE TRUE XOR TRUE FALSE OR TRUE FALSE AND FALSE TRUE XOR TRUE TRUE AND TRUE TRUE AND TRUE TRUE AND TRUE FALSE AND TRUE TRUE AND FALSE FALSE OR FALSE FALSE XOR TRUE TRUE OR TRUE TRUE OR FALSE TRUE AND TRUE FALSE NEGATE TRUE OR TRUE TRUE XOR TRUE TRUE XOR FALSE FALSE XOR FALSE TRUE OR TRUE TRUE AND FALSE TRUE XOR FALSE TRUE XOR FALSE FALSE NEGATE TRUE XOR FALSE TRUE NEGATE TRUE XOR TRUE FALSE OR TRUE FALSE OR TRUE FALSE XOR TRUE FALSE NEGATE TRUE XOR FALSE FALSE NEGATE TRUE XOR FALSE FALSE OR TRUE TRUE OR FALSE FALSE OR FALSE TRUE NEGATE TRUE AND TRUE TRUE OR FALSE FALSE AND TRUE FALSE XOR FALSE FALSE AND TRUE TRUE AND FALSE FALSE AND TRUE TRUE NEGATE TRUE AND FALSE TRUE OR FALSE FALSE XOR FALSE TRUE AND TRUE FALSE OR FALSE TRUE NEGATE TRUE AND FALSE TRUE XOR TRUE FALSE AND TRUE FALSE XOR TRUE FALSE AND TRUE TRUE NEGATE TRUE NEGATE TRUE XOR TRUE TRUE NEGATE FALSE NEGATE TRUE NEGATE FALSE
more included in TXT file
Task #2 Write the Program for logical operations 1. You need to implement a program which will do some Boolean operations. You need to create two classes. One class is BooleanOperationDriver which has the main method and the other class is BooleanOperation which has four static methods as shown in the following figure. The driver class will call the correct static method from ooleanOperation while reading each line from operations.txt file. Make sure that you are handling the line which cannot have correct input by giving warning and skipping that line and continue to read the next line. > BooleanOperation > week3 BooleanOperationDriver BooleanOperation() not(String):String xor(String, String):String 'and(String, String):String For(String, String):String week3 BooleanOperationDriver() main(String):void 2. You basically open the file operations.txt file (The file is on the blackboard.). According to given command such as "OR", "AND", "XOR", "NEGATE", with "FALSE" and "TRUE", you need to produce the correct output and write each operation with their results another file which is called operationsResult.txt. The following explanations give when true or false occurs for different Boolean operations. (Think 1 is true and 0 as false.) 1 if is 0 NOT(x) 0 if is 1 The and, or, and exclusive or functions are familiar boolean functions of two variables. (1 if both and y are 1 AND(x, y) lo otherwise results another file which is called operationsResult.txt. The following explanations give when true or false occurs for different Boolean operations. (Think 1 is true and 0 as false.) (1 if is 0 NOT () 0 if is 1 The and, or, and exclusive or functions are familiar boolean functions of two variables. 1 if both z and y are 1 AND(x, y) 0 otherwise 1 if either z or y (or both) is 1 OR(r, y) 0 otherwise (1 if x and y are different XOR(x, y) = lo otherwiseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started