Need help coding
//declare two intss, numberOfZeroes and numberOfOnes
//loop through each char, similar method to the one in isWellFormed
//if char is 1, then numberofzeros++, if char is 0, numberofzeros++
//do some math to figure out if the value is even or odd. Hint: Modulus (%) division
//if number of ones is even, add a 0
//else add a 1 (or is it the other wa around? read it)
//using newasci.concat(ascii).concat("1") or 0
//else for if even == false
//number of ones is even, add a 1
//else add a 0
It sounds like you already know what to do. Show us what you have done so far and tell us where you are having problems. We aren't going to write it for you.
That's really clear pseudo code. Just convert that directly into java and post what you get. We can go from there.