Results 1 to 2 of 2
- 04-15-2011, 09:45 PM #1Member
- Join Date
- Apr 2011
- Rep Power
Writing a java applet that converts numbers to words
I need help to design and write an applet that searches for single-digit numbers in a TextField and changes them to their corresponding words displayed in a TextArea. For example, the string “4 score and 7 years ago” would be converted into “four score and seven years ago”.
Add in the functionality that would accept multiple-digit numbers and change them similar to this example: “A baseball game has 27 outs!” would be changed to “A baseball game has two-seven outs!”
I have an example picture of how I would like it to look.
- 04-16-2011, 04:33 AM #2
This is basic String parsing. Just check for a number and replace with the appropriate word.
- By echo33 in forum New To JavaReplies: 4Last Post: 04-22-2009, 10:52 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 12-15-2007, 09:20 PM
- By trill in forum New To JavaReplies: 1Last Post: 08-06-2007, 06:52 AM
- By cachi in forum New To JavaReplies: 1Last Post: 08-01-2007, 10:57 AM
- By levent in forum Java SoftwareReplies: 0Last Post: 05-24-2007, 11:08 AM