Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introductory C++ practice program help please. I want to learn this before the exam. This is the unsorted_media.txt I want this done without

Introductory C++ practice program help please. I want to learn this before the exam. This is the "unsorted_media.txt" I want this done without  (its because we havent learned it yet and we just learned if,while, for, else, loops lol). Thank you for your help ------------------ 
#Selfie.mp3 Baby.mp3 Barbie_Girl.mp3 billy_madison.mkv BoOzy'_OS_Interdit_aux_PoOlets.mkv Breaking_Bad_Felina.mkv Buffy_the_Vampire_Slayer_Once_More,_with_Feeling.mkv Call_Me_Maybe.mp3 clerks.mkv Dexter_The_Getaway.mkv Doctor_Who_Blink.mkv dodgeball.mkv dude_wheres_my_car.mov dumb_and_dumber.avi Friday.mp3 Game_of_Thrones_Battle_of_the_Bastards.mkv Gangnam_Style.mp3 Gravity_Falls_Not_What_He_Seems.mkv Hannibal__Mizumono.mkv Hannibal_The_Wrath_of_the_Lamb.mkv happy_gilmore.avi harold_and_kumar_go_to_white_castle.mkv Let_It_Go.mp3 Person_of_Interest_If-Then-Else.mkv Rick_and_Morty_The_Ricklantis_Mixup.mkv Samurai_Jack_Episode_XCIII.mkv scary_movie.vhs Six_Feet_Under_Everyone's_Waiting.mkv Suits_Character_and_Fitness.mkv the_animal.avi tommy_boy.vhs waterboy.m4a waynes_world.mov Who_Let_the_Dogs_Out.mp3 zoolander.mov

--------------------

image text in transcribed

image text in transcribed

image text in transcribed

Unit 5: Programming CSIS 123 Programming Fundamentals: The purpose of this lab is to gain practice using repetition control statements. While messing around with Linux command line, your friend accidentally deleted all the media directories, while moving all individual files into the main directory. There is now a need to examine each file and sort into to music.tt, movies.txt, and series.txt. unsorted input file is attached here: unsorted_media.txt Constraints Do not use any concepts beyond the current chapter, unless explicitly stated in the tasks below .Re-use a single string variable for each entry Hint: .Use repetition to read one file at a time, then use a sequential control statement to sort Task 1: Setup Variables 1. Add unsorted media txt file to the resource files folder 2. Use preprocessor directives to include inputoutput, ile inputoutput, and string variables 3. Declare the input file variable you will use in place of cin for file input. 4. Doclare three output file variables you will use inplace of cout for writing to music.txt, movies.tt, 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 Task 2: Input Output Data 1. Use the variable from Task 1.3 to open the text file in Task 1.1 2. Use the variables from Task 14 to open the text files indicated in Task 1.4 3. Use a repetition control statement to determine if the variable fom Task 1.3 has not yet reaced 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 Task 3: Cleanup 1. Close the connection from the variable in Task 2.1 2. Close the connection from the variables in Task 2.2 Unit 5: Programming CSIS 123 Programming Fundamentals: The purpose of this lab is to gain practice using repetition control statements. While messing around with Linux command line, your friend accidentally deleted all the media directories, while moving all individual files into the main directory. There is now a need to examine each file and sort into to music.tt, movies.txt, and series.txt. unsorted input file is attached here: unsorted_media.txt Constraints Do not use any concepts beyond the current chapter, unless explicitly stated in the tasks below .Re-use a single string variable for each entry Hint: .Use repetition to read one file at a time, then use a sequential control statement to sort Task 1: Setup Variables 1. Add unsorted media txt file to the resource files folder 2. Use preprocessor directives to include inputoutput, ile inputoutput, and string variables 3. Declare the input file variable you will use in place of cin for file input. 4. Doclare three output file variables you will use inplace of cout for writing to music.txt, movies.tt, 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 Task 2: Input Output Data 1. Use the variable from Task 1.3 to open the text file in Task 1.1 2. Use the variables from Task 14 to open the text files indicated in Task 1.4 3. Use a repetition control statement to determine if the variable fom Task 1.3 has not yet reaced 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 Task 3: Cleanup 1. Close the connection from the variable in Task 2.1 2. Close the connection from the variables in Task 2.2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why could the Robert Bosch approach make sense to the company?

Answered: 1 week ago