Question
Create program that will merge the contents of the text files located in the given folder. The program will generate a ?merge-list.txt? text file as
Create program that will merge the contents of the text files located in the given folder. The program will generate a ?merge-list.txt? text file as an output and to be placed inside the folder ?MERGE? that will be generated inside the given folder. The input text files contain a list of citizen information. Each line contains the firstname, middlename, lastname, and birtdate of the citizen and separated by ?|? character.
The output file will contain the list of citizen in grouped in 3 categories: Juvenile Citizen (age 18 below), Legal Age Citizen (age 18 to 59), Senior Citizen (age 60 and above) and the citizen names are arrange in alphabetical order. This is the format of the output file: CITIZEN COUNT: JUVENILE CITIZEN:
FOLDER NAME: CitizenList
List1
Yuli|Dunn|Bradshaw|12/05/1956 Abdul|Todd|Massey|06/16/2013 Elijah|Roberson|Waters|02/20/1963 Ulla|Whitley|Davis|04/08/1970 Maxine|Burch|Leach|08/23/1993 Reagan|Nichols|Compton|05/08/2004 Zenia|Mccullough|Castro|08/04/1966 Jena|Conrad|Kelly|09/09/1953 Guinevere|Mccoy|Bradley|03/21/1998 August|Skinner|Burt|03/13/1955 Preston|Velez|Wall|06/22/1957 Akeem|Valdez|Graves|07/05/1953 Nasim|Moore|Rivas|12/02/1961 Clark|Payne|Calderon|10/27/2012 Shay|Pope|Rojas|03/30/1952 Willow|Farrell|Holder|03/19/2001 Eden|Weeks|Olson|10/26/2001 Acton|Stephens|Franks|01/22/1983 Elvis|Pollard|Greer|01/19/1990 Tucker|Bender|Anthony|03/31/1965 Amery|Love|Mclean|04/07/1993 Zephr|Franks|Velez|04/04/2000 Jordan|Coffey|Alvarado|04/24/1977 Gil|Miranda|Lowery|06/22/1982 Shellie|Mcknight|Haney|06/17/1963 Baxter|Valdez|Langley|10/03/1970 Quentin|Langley|Park|05/27/1956 Gray|Fuentes|Hodges|05/30/2011 Keith|Marquez|Collins|12/06/1956 Kimberley|Sampson|Robinson|07/02/1954 Burke|Emerson|Shepard|07/23/2003 Cyrus|Drake|Bowman|01/01/1988 Travis|Rivera|Reese|09/17/2017 Carla|Pittman|Macdonald|05/01/2013 Lev|Espinoza|Wood|02/20/1952 Tamara|Baker|Colon|08/31/1964 Jasmine|Noel|Kirk|02/10/1977 Quintessa|Rosales|Hardy|07/21/1979 Dana|Tate|Stokes|09/26/1965 Charde|Simmons|Jones|03/19/2001 Chase|Mccray|Higgins|03/25/1987 Idona|Munoz|Hester|09/15/2018 Xander|Pruitt|Casey|07/18/1976 Lucius|Hunter|Holmes|10/15/2007 Inga|Harris|Lee|05/04/1960 Iliana|Chaney|West|06/28/1957 Adara|Richards|Mayer|04/25/1983 Charles|Compton|Lopez|08/26/1978 Macey|Lancaster|Woods|01/28/1976 Isabelle|Madden|Spence|04/19/2008 Sebastian|Richard|Stark|11/05/1976 Amena|Chan|Moreno|10/20/1952 Charlotte|Wolf|Curry|12/04/1983 Brooke|Rivas|Newton|08/06/1994 Alyssa|Russell|Mills|10/01/1953 Donovan|Huff|Conner|01/15/1953 Upton|Pearson|Montgomery|12/11/2013 Jennifer|Morse|Hines|10/09/2015 Travis|Rhodes|Hughes|11/21/1987 Beverly|Gonzalez|Sweeney|05/25/1962 Joseph|Landry|Mckee|09/05/2016 Jenna|Byrd|Leblanc|03/30/1963 Leilani|Erickson|Riggs|04/26/2006 Orson|Haney|Wilder|06/06/2013 Quinlan|Alston|Maldonado|06/29/2015 Dominique|Huber|Garcia|01/05/1977
List2
Yuli|Dunn|Bradshaw|12/05/1956 Abdul|Todd|Massey|06/16/2013 Elijah|Roberson|Waters|02/20/1963 Ulla|Whitley|Davis|04/08/1970 Maxine|Burch|Leach|08/23/1993 Reagan|Nichols|Compton|05/08/2004 Zenia|Mccullough|Castro|08/04/1966 Jena|Conrad|Kelly|09/09/1953 Guinevere|Mccoy|Bradley|03/21/1998 August|Skinner|Burt|03/13/1955 Rosalyn|Meyers|Elliott|12/16/1978 Lance|Jensen|Hughes|12/05/1962 Malik|Schmidt|Dickson|09/27/1955 Shelby|Mooney|Woodward|01/29/2003 Brynne|Everett|Black|01/17/1960 Nicole|Mann|Cardenas|06/21/1978 Matthew|Hopkins|Nixon|01/06/2001 Preston|Velez|Wall|06/22/1957 Akeem|Valdez|Graves|07/05/1953 Nasim|Moore|Rivas|12/02/1961 Clark|Payne|Calderon|10/27/2012 Shay|Pope|Rojas|03/30/1952 Willow|Farrell|Holder|03/19/2001 Eden|Weeks|Olson|10/26/2001 Acton|Stephens|Franks|01/22/1983 Elvis|Pollard|Greer|01/19/1990 Shea|Smith|Mccarty|07/11/1965 Allistair|Bass|Lopez|07/12/1974 Candice|Langley|Romero|04/07/1999 Linus|Patrick|Mosley|10/04/1986
List3 Malachi|Sexton|Burns|05/28/1991 Keegan|Cannon|Hoover|07/07/2006 Anastasia|Miranda|Patton|08/28/1952 Isaiah|Rodriguez|Horn|11/29/1981 Ignatius|Dillon|Chan|06/30/1963 Quinn|Norman|Phelps|01/24/1985 Sydney|Nieves|Merrill|07/05/1972 Brady|Kirby|Vaughn|08/30/1951 Hanna|Pollard|Gallegos|05/25/1981 Vladimir|Simpson|Dejesus|06/13/1955 Hasad|Rocha|Horn|06/09/1968 Valentine|Mclean|Mcdaniel|04/09/1998 Indira|Newman|Ayers|10/05/1969 Rosalyn|Warren|Patel|07/08/2014 Evan|Bennett|Montgomery|09/28/1953 Leroy|Mendoza|Bridges|05/08/1993 Quintessa|Sanford|Mathis|10/04/1953 Tanner|Barrett|Mcclain|08/09/2000 Jerome|Lara|Carver|11/30/2016 Ian|Torres|Wells|04/29/1976 Brody|Middleton|Mckee|12/19/1985 Mary|Hurley|Meyers|05/30/2005 Fredericka|Santiago|Craft|11/09/1955 Cairo|Witt|Pennington|06/06/1973 Kevyn|Randall|Gibbs|12/16/2011 Octavius|Mercado|Lawrence|07/20/2006 Cailin|Pollard|Snyder|12/01/1954 Tamekah|Glover|Blevins|04/13/2002 Ronan|Reilly|Steele|10/06/1972 Alfreda|Castillo|Mcgee|06/15/1977 Barclay|Pruitt|Meyer|12/20/1984 Tate|Gomez|Potter|12/26/2014 Fatima|Ratliff|Blevins|10/21/2014 Julie|Ruiz|Hawkins|06/07/1983 Austin|Arnold|Hull|01/22/1965 Zorita|Rosa|Petty|02/06/1961 September|Cardenas|Holcomb|03/17/1993 Phillip|Campos|Haney|01/13/1982 Arden|Hernandez|Roberson|04/12/1967 Guy|Estes|Meyers|01/20/1985 Evan|Jimenez|Doyle|10/07/2003 Ashton|Gould|Santos|02/10/2007 Price|Good|Fischer|04/06/2015 Deirdre|Barrett|Mcpherson|01/29/1985 Angelica|Ellis|Ferguson|05/27/1986 Vance|Humphrey|Moss|05/10/1996 Charde|Gardner|Meyer|04/06/2015 Cade|Holcomb|Juarez|03/18/1950 Aladdin|Waters|Taylor|12/08/1988 Cameron|Gray|Wagner|02/25/1996 Emerson|Dale|Higgins|09/09/1960 Mariam|Griffin|Jacobson|02/04/1998 Jamalia|Mooney|Glass|07/26/2008 Catherine|Mercado|Porter|10/15/2018 Wynne|Hansen|Macias|03/20/1991 Prescott|Navarro|Norton|04/01/2005 Shellie|Valdez|Boyer|11/07/1969 Mallory|Edwards|Spears|11/21/1975 Jade|Woods|Pace|07/07/1964 Quentin|Mcclain|Harper|09/01/1985 Lisandra|Bender|Holloway|04/01/1983 Ciaran|Cooley|Woodward|09/09/1987 Forrest|Malone|Sanders|12/14/1955 Scarlett|Santiago|Sheppard|08/07/1999 Amos|Serrano|Powers|06/24/2001 Suki|Cervantes|Herrera|08/29/2018
List4 Kamal|Bond|Hester|05/02/2000 Tyrone|Cohen|Cameron|11/05/1991 Kellie|Morrison|Oneill|08/09/1989 Ifeoma|Burnett|Blanchard|05/31/2001 Vance|Beasley|Britt|10/13/1956 Candace|Cervantes|Griffith|08/15/1976 Chloe|Abbott|Sims|08/31/1998 Bernard|Reese|Chaney|08/08/2006 Aaron|Strong|Holt|08/04/2015 Shellie|Oliver|Jones|05/03/2003 Daniel|Kirkland|Blevins|04/12/1968 Sylvester|Barton|Fox|01/27/1961 Len|Santos|Callahan|12/19/1994 Quintessa|Bird|Guthrie|01/10/2003 Levi|Conrad|Norton|04/06/1981 Mia|Holden|Avila|10/18/1978 Knox|Kim|Kidd|05/21/1987 Zena|Snider|Bolton|02/10/1981 Adena|Rasmussen|Mercado|02/12/1996 Kennan|Dawson|Hunter|09/11/1994 Kirestin|Baldwin|Malone|06/25/2002 Barry|Bowers|Santiago|03/19/1984 Ayanna|Huffman|Blanchard|11/14/1995 Gemma|Woodard|Jacobs|05/12/1989 Emi|Greene|Phelps|06/01/1963 Samson|Witt|Holman|05/16/1976 Hadassah|Wilkerson|Bowers|07/18/1953 Jeremy|Bender|Ball|03/13/2009 Pamela|Stafford|Hurst|09/26/2007 Andrew|Castro|Daugherty|12/29/1978 Chantale|Rodriquez|Riley|07/29/2007 Samuel|Wiggins|Craft|12/21/1955 Colin|Perez|White|01/30/1975 Nomlanga|Conway|Sawyer|11/27/1962 Neville|Sosa|Roach|04/27/1976 Brady|Jones|Nash|01/01/1962 Geoffrey|Fitzpatrick|Swanson|06/13/1989 Jeanette|Osborn|Singleton|12/12/1981 Octavius|Joyner|Logan|04/16/1985 Tyrone|Preston|Hartman|04/09/1984 Eden|Compton|Lindsey|06/28/1960 Bo|Eaton|Little|04/11/2006 Nora|Vaughn|Durham|07/20/1999 Keith|Becker|Ochoa|02/18/1990 Barclay|Todd|Kennedy|08/21/1965 Angelica|Bryan|Cain|05/09/1977 Shelley|Mcneil|Wallace|10/11/2001 Shelley|Giles|Bryan|11/13/1985 Raymond|Mcpherson|Ferguson|11/14/1982 Kenneth|England|Bates|03/04/1952 Sacha|Roach|Bradshaw|10/03/1969 Astra|Huff|Alston|04/22/1993 Kelly|Clark|Dennis|07/07/1961 Alden|Gilliam|Byers|07/13/1965 Drew|Crawford|Cortez|02/17/2001 Mari|Chan|Alvarez|07/05/1984 Colorado|Casey|Wall|02/26/1961 Wendy|Sparks|Durham|08/05/1977 Ulla|Rivas|Guthrie|02/17/1969 Allegra|Larson|Knight|05/25/1951 Xander|Burton|Crawford|03/16/2003 Kelly|Foley|Mcknight|09/12/1957 Samantha|Bradley|Mays|11/26/1966 Guy|Battle|Davenport|07/18/1983 Alika|Kelley|Cash|12/06/1960 Prescott|Russo|Kent|07/21/1962 Ethan|Baxter|Moody|12/08/1999 Nomlanga|Jenkins|Paul|04/16/1993 Asher|Thornton|Barr|03/06/2015 Raphael|Jordan|Garrett|03/14/1980 Jael|Bartlett|Petersen|04/27/1988 Tucker|Serrano|Farrell|09/29/1983 Keiko|Norton|Bolton|08/07/1953 Breanna|Fitzgerald|Moreno|01/12/1998 Zia|Perkins|Giles|04/22/1987 Illiana|Salazar|Santos|02/09/1956 Ava|Andrews|Mcfadden|09/10/2017 Ulla|Marsh|Johnston|01/03/1996 Bertha|Mayo|Stanton|11/05/1963
List5
Macey|Martin|Pope|03/16/2003 Hadassah|Horn|Tran|03/27/2000 Hiroko|Barlow|Perry|12/11/1987 Marah|Good|Figueroa|10/12/1950 Sylvia|Bell|Burks|01/26/1979 Perry|Guerra|Dixon|10/28/2001 Azalia|Crosby|Harvey|02/23/1982 Shoshana|Keller|Sloan|02/24/1957 Kellie|Morrison|Oneill|08/09/1989 Ifeoma|Burnett|Blanchard|05/31/2001 Vance|Beasley|Britt|10/13/1956 Candace|Cervantes|Griffith|08/15/1976 Chloe|Abbott|Sims|08/31/1998 Bernard|Reese|Chaney|08/08/2006 Aaron|Strong|Holt|08/04/2015 Shellie|Oliver|Jones|05/03/2003 Daniel|Kirkland|Blevins|04/12/1968 Sylvester|Barton|Fox|01/27/1961 Len|Santos|Callahan|12/19/1994 Quintessa|Bird|Guthrie|01/10/2003 Levi|Conrad|Norton|04/06/1981 Mia|Holden|Avila|10/18/1978 Knox|Kim|Kidd|05/21/1987 Zena|Snider|Bolton|02/10/1981 Adena|Rasmussen|Mercado|02/12/1996 Kennan|Dawson|Hunter|09/11/1994 Kirestin|Baldwin|Malone|06/25/2002 Barry|Bowers|Santiago|03/19/1984 Ayanna|Huffman|Blanchard|11/14/1995 Gemma|Woodard|Jacobs|05/12/1989 Emi|Greene|Phelps|06/01/1963 Samson|Witt|Holman|05/16/1976 Hadassah|Wilkerson|Bowers|07/18/1953 Jeremy|Bender|Ball|03/13/2009 Pamela|Stafford|Hurst|09/26/2007 Andrew|Castro|Daugherty|12/29/1978 Chantale|Rodriquez|Riley|07/29/2007 Samuel|Wiggins|Craft|12/21/1955 Colin|Perez|White|01/30/1975 Nomlanga|Conway|Sawyer|11/27/1962 Neville|Sosa|Roach|04/27/1976 Brady|Jones|Nash|01/01/1962 Geoffrey|Fitzpatrick|Swanson|06/13/1989 Angelica|Bryan|Cain|05/09/1977 Shelley|Mcneil|Wallace|10/11/2001 Shelley|Giles|Bryan|11/13/1985 Raymond|Mcpherson|Ferguson|11/14/1982 Kenneth|England|Bates|03/04/1952 Sacha|Roach|Bradshaw|10/03/1969 Astra|Huff|Alston|04/22/1993 Kelly|Clark|Dennis|07/07/1961 Alden|Gilliam|Byers|07/13/1965 Drew|Crawford|Cortez|02/17/2001 Mari|Chan|Alvarez|07/05/1984 Colorado|Casey|Wall|02/26/1961 Wendy|Sparks|Durham|08/05/1977 Ulla|Rivas|Guthrie|02/17/1969 Allegra|Larson|Knight|05/25/1951 Xander|Burton|Crawford|03/16/2003 Kelly|Foley|Mcknight|09/12/1957 Samantha|Bradley|Mays|11/26/1966 Guy|Battle|Davenport|07/18/1983 Alika|Kelley|Cash|12/06/1960 Breanna|Fitzgerald|Moreno|01/12/1998 Zia|Perkins|Giles|04/22/1987 Illiana|Salazar|Santos|02/09/1956 Ava|Andrews|Mcfadden|09/10/2017 Ulla|Marsh|Johnston|01/03/1996 Bertha|Mayo|Stanton|11/05/1963
I NO + - | 000001 | , | 000002 | , | 000003 | , | ... | , NAME LEGAL AGE CITIZEN: + T NO | +------ | 000001 | , | 000002 | , | 000003 | , I ... | , SENIOR CITIZEN: +-- I + NAME NO T | | 000001 | , 000002 | , | 000003 | , I. .. | , +- ---- NAME | BIRTHDATE AGE I ---- 000 000 | MM/DD/YYYY | | MM/DD/YYYY | | MM/DD/YYYY | 000 | MM/DD/YYYY | 000 + | BIRTHDATE | AGE | BIRTHDATE ---- | MM/DD/YYYY | 000 | MM/DD/YYYY | 000 | MM/DD/YYYY | 000 | MM/DD/YYYY | 000 AGE ---- I T I | -+ -+ | I | | I -+ I -+ | MM/DD/YYYY | 000 I | MM/DD/YYYY | 000 I 000 I | MM/DD/YYYY | | MM/DD/YYYY | 000 -+ Sample Run: CITIZEN LIST SORTER Enter the folder: d: \List No Folder Found Enter 'y' to try again: y CITIZEN LIST SORTER Enter the folder: d:\CitizenList File Content of d:\CitizenList >> List1.txt: READING SUCCESSFUL >> List2.txt: READING SUCCESSFUL >> List3.txt: FORMAT ERROR FOUND, READING STOP AT LINE 11 >> List4.txt: READING SUCCESSFUL >> List5.txt: READING SUCCESSFUL The output file is generated: >> d: Enter 'y' to try again: n \CitizenList\MERGE\merge-list.txt >> PROGRAM TERMINATED
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
The Program is divided into 3 separate class files Please create all the 3 files given below in their respective tables with the exact names within your ide and save after then run the driver file ie ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started