Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ practice problem, was wondering if it could be done using cout and cin (string and bool/boolean too) thanks ============================== Here is the Move_list.text Army_of_Darkness_(1992).avi
C++ practice problem, was wondering if it could be done using cout and cin (string and bool/boolean too) thanks
==============================
Here is the "Move_list.text"
Army_of_Darkness_(1992).avi Batman_&_Robin_(1997).m4v Donnie_Darko.mp4 Dr._Strangelove_or_How_I_Learned_to_Stop_Worrying_and_Love_the_Bomb_(1964).m4v Life_of_Brian_(1979).avi Lock,_Stock_and_Two_Smoking_Barrels_(1998).avi National_Lampoon's_Christmas_Vacation_2_Cousin_Eddie's_Island_Adventure_(2003).mkv Repo!_The_Genetic_Opera_(2008).mkv Spaceballs_(1987).mkv To_Wong_Foo_Thanks_for_Everything,_Julie_Newmar.mp4
==============================
CSIS 123 Programming Fundamentals: The purpose of this lab is to gain practice using control statements. Your friend is interested in being able to sort a media collection. There will be a file containing media, and the request is to accept or delete each entry in the media file. File is attached here: movie_list.fxt 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: .Examine the input text file. You will be repeating the setps below for each record Task 1: Setup Variables 1. Add your input text 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 the output file variable you will use inplace of cout for keep file output. 5. Declare the output file variable you will use inplace of cout for delete file output. 6. Declare a variable to contain movie titles, of type string 7. Declare a variable to contain a user keystroke choice, of type char. 8. 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 variable from Task 1.3 to assign value to Task 1.6 3. Use a control statement to determine if the variable from Task 1.6 has value 4. If Task 2.2 returns TRUE, promt to either keep or discard the media identified by the string variable. The user decision will be stored in the variable from Task 1.7 5. Use a control statemnt ( cannot be the same kind of control statement from Task 2.2) to read the variable from Task 1.7 If it is the case that the user enters "Y" for yes, write variable from Task 1.6 to the variable from Task 1.4 If it is the case that the user enters 'N' for no, write the variable from Task 1.6 to the variable from Task 1.5 If it is the case that the user enters any other variable, notify the user the input is invalid, then wite the variable from Task 1.6 to the variable from Task 6. Store an empty string to the variable from Task 1.6 7. Repeat Task 2.1 - 2.5 for each entry in movie_list.txt 8. Separate Task 2 from Task 3 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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