[Solved]Lab Description Read One Word Time File Output Word Hourglass Sample Data Data Sets Tho Ni Q37276833



Lab Description: Read in one word at a time from the file and output the word as an hourglass. Sample Data: # of data sets in tho nie . HELLO CAT Files Needed FancyWord.java FancyWordRunner.java fancyword.dat DOGHOUSE ONE IT Sample Output: algorithm help HELLO E L ti ward.isnathi): +) tor jot i- 0: E L HELLO 3 more statements Blike the one I gave you CAT A. CAT DOGHOUSE o s H0 Ho DOGHOUSE ONE ONE import java.util.Scanner; import static java.lang.System.* public class FancyWord private StringtI mat; public Fancyword (String s) //size the matrix //use Arrays.fili1O to fill in the matrix with spaces //use a for loop to load in the letters into the matrix public String toString() String output=””; return output+”AnNn” import java.io.File; import java.io. IOException import java.util.Scanner import static java.lang.System.*; public class FancyWordRunner throws IOException public static void main( String args Scanner file new Scanner (new File (“fancyword.dat)) int size = file.nextInt(); file.nextLine (); for (int í 0; i<size; 1++) String word -file.next )i 6 HELLO CAT DOGHOUSE ONE IT G fancyword.dat* Show transcribed image text Lab Description: Read in one word at a time from the file and output the word as an hourglass. Sample Data: # of data sets in tho nie . HELLO CAT Files Needed FancyWord.java FancyWordRunner.java fancyword.dat DOGHOUSE ONE IT Sample Output: algorithm help HELLO E L ti ward.isnathi): +) tor jot i- 0: E L HELLO 3 more statements Blike the one I gave you CAT A. CAT DOGHOUSE o s H0 Ho DOGHOUSE ONE ONE
import java.util.Scanner; import static java.lang.System.* public class FancyWord private StringtI mat; public Fancyword (String s) //size the matrix //use Arrays.fili1O to fill in the matrix with spaces //use a for loop to load in the letters into the matrix public String toString() String output=””; return output+”AnNn”
import java.io.File; import java.io. IOException import java.util.Scanner import static java.lang.System.*; public class FancyWordRunner throws IOException public static void main( String args Scanner file new Scanner (new File (“fancyword.dat)) int size = file.nextInt(); file.nextLine (); for (int í 0; i
Expert Answer
Answer to Lab Description: Read in one word at a time from the file and output the word as an hourglass. Sample Data: # of data se… . . .
OR

