Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-25-2009, 02:08 AM
Member
 
Join Date: Nov 2009
Posts: 8
Rep Power: 0
ace_03 is on a distinguished road
Default 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++
//if (even)
//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
//return newascoo
//profit
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-25-2009, 03:19 AM
Senior Member
 
Join Date: Nov 2009
Posts: 155
Rep Power: 1
collin389 is on a distinguished road
Default
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-25-2009, 06:16 PM
xcallmejudasx's Avatar
Senior Member
 
Join Date: Oct 2008
Location: Houston, TX & Flint, MI
Posts: 585
Rep Power: 2
xcallmejudasx is on a distinguished road
Send a message via AIM to xcallmejudasx
Default
That's really clear pseudo code. Just convert that directly into java and post what you get. We can go from there.
__________________
Liberty has never come from the government.
Liberty has always come from the subjects of government.
The history of liberty is the history of resistance.
The history of liberty is a history of the limitation of governmental power, not the increase of it.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding help Java_Fanatic New To Java 7 10-15-2009 05:37 AM
Better coding tomiu New To Java 1 04-09-2009 08:19 PM
swing coding priya_gurnani166 AWT / Swing 8 01-30-2009 08:18 AM
coding help accies76 New To Java 5 11-12-2008 09:15 PM
Help with program coding cachi AWT / Swing 1 07-31-2007 08:16 AM


All times are GMT +2. The time now is 06:42 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org