Question: [In Java] What am I doing wrong with my code on line 15? What I plan to do: create a hash table with the String

[In Java]

What am I doing wrong with my code on line 15?

[In Java] What am I doing wrong with my code on line

What I plan to do: create a hash table with the String keys "+", "-", "/", "*" . And the values would be the object(of the classes). I have already made Addition.java, Subtraction.java, Multiplication.java, Division.java. They all have nothing filled in them.

15? What I plan to do: create a hash table with the

Evaluatorul.java Operator.Java |! | 0 java 2 Operand.java 1.aye'E 8gIls. Additionjava Subtraction.java. Source History |,. | | import java.util.HashMap: /*Hashmap K-keys V type of mapped values 6 public abstract class Operator // The Operator class should contain an instance of a HashMap // This map will use keys as the tokens we're interested in, // and values will be instances of the Operators. 10 12 13 14 // Example: // Where does this declaration go? What should its access level be? // Class or instance variable? Is this the right declaration? static Ha3hMap opera tor = new Ha3hMap(){ operator.put(, new Addition) 16 17 18 19 20 21 //map.put"-, new Subtraction) public abstract int priority): public abstract Operand execut rand op1, Operand op2) 23 24 25 26 public static boolean check( String token return false

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!