Question: Java// please use the code provided. Thank You! 9.7 LAB: File name change A photographer is organizing a photo collection about the national parks in

Java// please use the code provided. Thank You!
Java// please use the code provided. Thank You! 9.7 LAB: File name
change A photographer is organizing a photo collection about the national parks
in the uS and would lke to annotate the information about each

9.7 LAB: File name change A photographer is organizing a photo collection about the national parks in the uS and would lke to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo fle names The program then reads the photo file names from the text fise, repiaces the ". photo jpg' portion of the file names with " info ter" and outputs the modified file names Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is emply, the program produces no output Ex. if the input of the program is: Parkphotos, txt and the contents of ParkPhotos tat are: Acadia2003_photo.jpg Nhoricantamoa1989 photo.jpq MackCanyonothecunnlsoni98 phota. Jpg Carlsbadcaverna2010 photo 2 jpg Crater Lake1996 photo.jpg CrandCanyon1996 photo.3pg Indianabunes1987 photo. Jpg Lakeclark2009 photo. 3pq Redwood1980 photo. Jpg Virgintnlands2007 photo 3 pg voyegeuro2006 photo. Jpg. Wranged1stmilan196? photo, 2p9 the output of the program is: Acadia2003 into, ext Americansamoal.989 info.text BlackeanyonottheGunnison1983 info. txt CarlsbadCavezna2010 1nfo.txt Craterlake1996 info, txt GrandCanyon 1996 Info, txt InidianaDunes 1987 info, txt: LakeClaxk2009 into.txt Redvoodl980 info.txt Virginjslandozo07 info, ext Voyageuts 2006 . Info. txt Wrangellsteltasig87 info.txt 1 import java.util. Scanner; 2 import java. to. FileinputStream; 3 import java.io. IOException; 4 5 public class LabProgram \& 6 public static void main(String[ args) throws IOException f 7 8 9 10 11 127 Scanner scnr = new Scanner(System. in); 13

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!