Question: This Java program accept American word from that array and find its British translation , I need to modify it with random generator that generates

This Java program accept American word from that array and find its British translation , I need to modify it with random generator that generates numbers from 0-11 , every time you pick a number it translates 5 times (loop 5 times) and print all.  This Java program accept American word from that array and find

49% . import java.io. import java.util. class atob public static void main(String argsD String word new String[2][11] String aw.bw=" ",temp; word[0][0]-"attic", word 1 [0]="loft". word[0][1 ]="business suit";word( 1 ][ 1 ]="lounge suit"; word[0][2elevator";word[1 ][2lift"; word[0][3]--flashlight";word( 1 ][3]="torch". word[0][4]="gasoline".word( 1 ][4]= "petrol". word[0][5]-"ice cream"word[[Sice", word[0][6)--megaphone".word[ ! ][6]="loud hailer"; word[01I7 radioword[][7]-"wireless" word[0][8]-"sneakers"-word[1 ][8]-"plimsolls", word[0](9)-"truck-.word( 1 191orry..; word[0][1 0]="zero"word[1 ][1 0)-"nought"; System.out.println"n enter the american word: "); Scanner in new Scanner(System.in); aw=in.nextL.ne(); for int i -0;iilit+) if(aw.compareTo( word[0][i])==0) bw word[ Ii] System.out.println"word not found"); else System.out,println"british word is " +bw) 5 C:\Users\SARATHCHANDRA\desktop\ chegg> java atob enter the american word: ritish word is loft attic s C:\Users SARATHCHANDRA\ desktop\ chegg java atob enter the american word: ord not found 5S C:\Users\ SARATHCHANDRA\desktop\ chegg

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!