mathfield as a Enum java

i'm trying to build a Calculator for school project.

i want it to have a math field(R,Q,Z,N) field, in order to deal with different kind of numbers.

(the user has to choose the field before enter the numbers)

i created a enum of mathField

public enum mathField {

R,Q;

}

and create a constructor of Calculator then gets mathField type.

but when im trying to creat new instance of Calculator using:

Calculator calc=new Calculator(Q);

i get the message "Q cannot resolved to a variable".

what am i doing wrong?...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts