I need to a java program that simulates a simple calculator. The calculator has the ability to have two real numbers inputted and then: multiply the two numbers divide the first number by the second number (be sure to check for division by 0 and provide an error message if this occurs) add the two numbers together subtract the second number from the first number
You are still welcome to help......
So, what problems are you having? Do you need to build this with a GUI or is command line just fine?
console
just the command line
Anyone?
you know how to get user input and do computation right?
Here you go. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=tutorial+console+java+calculator
That link should get you going
yeah for a starter.
Thanks bro
but I need more help when actually debugging my illiteracy in computing
;(
are you required to catch user input error?
yes
Any omnipotent superduper intellectuals willing to walk me along?
XD
then you have to #1: check if input is a float/int , #2: check its a not divide by 0
i dont do java but the concept is similar with other programming languages
Yeah that's true
try drawing a flowchart then think where might go wrong and where to do you need user input and types of input
Would be nice if openstudy had an edit feature....
then you have to think about how your users is going to choose his operations
I did it!
I improved the program from Nixy's link and it's working exactly as the requirements specify. XD Thanks all
Join our real-time social learning platform and learn together with your friends!