Ask your own question, for FREE!
Mathematics 23 Online
OpenStudy (anonymous):

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

OpenStudy (anonymous):

You are still welcome to help......

OpenStudy (anonymous):

So, what problems are you having? Do you need to build this with a GUI or is command line just fine?

OpenStudy (anonymous):

console

OpenStudy (anonymous):

just the command line

OpenStudy (anonymous):

Anyone?

OpenStudy (anonymous):

you know how to get user input and do computation right?

OpenStudy (anonymous):

That link should get you going

OpenStudy (anonymous):

yeah for a starter.

OpenStudy (anonymous):

Thanks bro

OpenStudy (anonymous):

but I need more help when actually debugging my illiteracy in computing

OpenStudy (anonymous):

;(

OpenStudy (anonymous):

are you required to catch user input error?

OpenStudy (anonymous):

yes

OpenStudy (anonymous):

Any omnipotent superduper intellectuals willing to walk me along?

OpenStudy (anonymous):

XD

OpenStudy (anonymous):

then you have to #1: check if input is a float/int , #2: check its a not divide by 0

OpenStudy (anonymous):

i dont do java but the concept is similar with other programming languages

OpenStudy (anonymous):

Yeah that's true

OpenStudy (anonymous):

try drawing a flowchart then think where might go wrong and where to do you need user input and types of input

OpenStudy (anonymous):

Would be nice if openstudy had an edit feature....

OpenStudy (anonymous):

then you have to think about how your users is going to choose his operations

OpenStudy (anonymous):

I did it!

OpenStudy (anonymous):

I improved the program from Nixy's link and it's working exactly as the requirements specify. XD Thanks all

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!