While messing around with Linux command line, your friend accidentally deleted all the media directories, while moving all individuals files into the main directory. There is now a need to examine each file and sort into to music.txt, movies.txt, and series.txt. unosrted input file is attached here: unsorted_media.txt
1. Add unsorted_media.txt file to the resource files folder.
2. Use preprocessor directives to include input/output, file input/output, and string variables.
3. Declare the input file variable you will use in place of cin for file input.
4. Declare three output file variables you will use inplace of cout for writing to music.txt, movies.txt, and series.txt.
5. Declare a variable to contain a media file of type string.
6. Declare a variable to contain a user keystroke choice, of type char.
7. Separate Task 1 from Task 2 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code.
1. Use the variable from Task 1.3 to open the text file in Task 1.1.
2. Use the variables from Task 1.4 to open the text files indicated in Task 1.4.
3. Use a repitition control statement to determine if the variable from Task 1.3 has not yet reached the end of file.
4. If Task 2.3 returns TRUE, use the variable from 1.3 to assign value to the variable from Task 1.5.
5. Output to the user screen, "The file is entitled: ", and then output the variable from Task 1.5.
6. Prompt the user to "sort this into Movies (M), Music (U), or Series (S): ".
7. Use a sequential control statement to validate user input.
8. Use a sequential control statement to determine which variable from Task 1.4 to write the file.
9. Separate Task 2 from Task 3 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code
1. Close the connection from the variable in Task 2.1.
2. Close the connection from the variables in Task 2.2.