Torch Suit
| Powered by phpBay Pro |

Help with java program!?
Can someone help with a java program for the information below:
need a program that accepts an American word as input and performs a binary search to translate in into its British equivalent. Use the following list of words for data, and accoun tfor the case when the word requested is not in the list:
American: ---- British: ---- American: ------ British:
attic ------------ loft ---- -----ice cream --- ----- ice
business suit ---- lounge suit ----megaphone ---- loud hailer
elevator ------- lift ------ radio ------ wireless
flashlight ------ torch ------sneakers -----plimsolls
french fries ----- chips ----- truck ------- lorry
gasoline ------petrol ------ zero ------nought
I would really appreciate it if anyone can help me with this program. Thanks for your help!
Some bits:
String[][] wordlist = new String[12][2]
final int BRITI = 1;
final int YANK = 0;
wordlist[0][YANK] = "attic";
wordlist[0][BRIT] = "loft";
And so one, until you've populated the list.
A binary search is fairly easy to implement, and you should have source code for it in your textbook or notes. Just remember that you search on wordlist[?][YANK] and return wordlist[?][BRIT]
Recently Purchased:
| Powered by phpBay Pro |







