Hi guys.got some problem in this program.Was suppose to write a program to get a binary
string and display its value. Need to have 3 methods.
binaryToDecimal()
-Receive string which represents the value
-Converts the binary value to decimal
-Return results
validateInput()
-Receive string as parameter
-Return true if string contains 0s and 1s,false otherwise
main()
-Read input using scanner class
-Call validateInput() method to check whether inputted value is binary value,display error message and repeat input process
-call binaryToDecimal() method to get its converted decimal value and display it
had some problem in the validateInput() part. not sure is it correct