Im simpy programming a simple calculator like every new java beginner. However, im trying to get a bit more detail and use the month of java knowledge i know. I created
i want the user to be able to input they're desired mathematical equation
That was the closest i could get to a char. However, when i try to implement a switch Statement because of its simplicity i get and error.
apperantly i cannot use a String on a switch statement. I do recon i can use a char but how will i be able to when i declared the mathEqua variable a String for the user input.
Please anything is well appreciated (Im comming from another forum that has a dead java beginner section). Im looking to use a more cleaner code based method not the whole "Press the integer 1 for addition, etc." . My goal is to provide this application later with a User Interface (GUI) in which i can use in my computer.
Im also looking into adding the:
to provide with mor mathematical expression rather than the simple +, /, -, and *.
thank you
-AndreeU
i want the user to be able to input they're desired mathematical equation
That was the closest i could get to a char. However, when i try to implement a switch Statement because of its simplicity i get and error.
apperantly i cannot use a String on a switch statement. I do recon i can use a char but how will i be able to when i declared the mathEqua variable a String for the user input.
Please anything is well appreciated (Im comming from another forum that has a dead java beginner section). Im looking to use a more cleaner code based method not the whole "Press the integer 1 for addition, etc." . My goal is to provide this application later with a User Interface (GUI) in which i can use in my computer.
Im also looking into adding the:
to provide with mor mathematical expression rather than the simple +, /, -, and *.
thank you
-AndreeU