Question: Code this in java, please. Structure: Properties One private property of type char logicSelection, the user's currently selected logical operation .One private property of type

Code this in java, please. Code this in java, please. Structure: Properties One private property of typechar logicSelection, the user's currently selected logical operation .One private property oftype int total, the total number of operations performed. Each time any

Structure: Properties One private property of type char logicSelection, the user's currently selected logical operation .One private property of type int total, the total number of operations performed. Each time any operation is selected, increment the counter keeping track of the total number of all the operations the user has performed. Structure: Methods The elements/ list of methods we include in every class. The method printMenu): this method prints the menu of available operations. Note, the method does not handle receiving a user selection, it merely displays menu information. The method makeLogicSelection(char logicSelection): this method set the logic selection to either 'a'/A' for the logical AND [ &&] or 'b'/B' for the logical OR [ 11. In your solution, ensure the user has selected a valid option [either (a) or (b)l. If not, print an error message and do not modify the previous selection made. The method performLogic(boolean operand1, boolean operand2, boolean negation): the method will receive two boolean values and calculate the result of the two boolean values when used with the selected logical operator [either AND or OR]. If true is passed in as the negation parameter, then a logical negation will precede the entire logical operation The method printTruthTable(): this method will print the truth table of the selected operation. For example, if Logical AND has been selected, print the entire truth table of the logical AND. . The method moduloRange(int modValue): this method will print the remainder range possible from a given modValue Output When calling each method [right clicking on the method in BlueJ] here is the output produced by each method Operation Menu Logic Selections: (a) Logical AND&& (b) Logical OR (I1 Methods: Make Logic Selection Modulo Range Perform Logic Print Truth Table Perform Logic Operation #1 Logic Selection a operand #1: Operand #2 : Negation: true true false (true &&true) yields true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!