Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Practice lab Help please the input_file.txt is Raising_Arizona 6000000 22847564 Vampire's_Kiss 2000000 725131 The_Wicker_Man 40000000 23643531 The_Ice_Pirates 9000000 13075390 Krull 47000000 16519460 please help

C++ Practice lab Help please

image text in transcribed

image text in transcribed

the "input_file.txt" is

Raising_Arizona 6000000 22847564 Vampire's_Kiss 2000000 725131 The_Wicker_Man 40000000 23643531 The_Ice_Pirates 9000000 13075390 Krull 47000000 16519460 

please help me do this practice lab.

Unit 3: Programming CSIS 123 Programming Fundamentals: The purpose of this lab is to gain practice using variables for file input, processing, and file output Your friend is interested in knowing if his favorite movies were box office successes. He gives you a file, and needs you to write a file labeling the movie title, budget, gross, and profit for each movie. Fil is attached here: input_file txt Constraints Do not use any concepts beyond the current chapter, unless explicitly stated in the tasks below Hint: .Examine the input text file. You wil be repeating the setps below for each record. Task 1: Setup Variables 1. Add your input text file to the resource files folder 2. Add yor output text file to the resource files folder 3. Use preprocessor directives to include input/output, file input/output, string variables, and input output manipulation 4. Declare the input file variable you will use inplace of cin for file input 5. Declare the output file variable you will use inplace of cout for file output 6. Declare variables to contain movie titles, of type string 7. Declare variables to contain budget and gross, of type double 8. Declare variables to contain net profit, of type double 9 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 Data 1. Use the variable in Task 1.4 to open the lext file in Task 1.1 2. Use the variable in Task 1.5 to open the text file in Task 1.2 3. Use the variable in Task 1.4 to populate variables from Task 1.6 and 1.7 4. Separate Task 2 from Task 3 by pressing ENTER on your keyboard This provides a single line of whitespace in your code Task 3: Process Data 1. Use the variables from Task 1.7 to populate the variable from Task 1.8 2. Separate Task 3 from Task 4 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code Task 4: Output Data 1. Use the variable from Task 1.5 to output to a file 2. Each variable from Task 1.6, Task 1.7, and Task 1.8 should be preceded by a label. "Movie Title.", etc Every row after "Movie Title. "should be written to a next line. See sample output Task 5: Cleanup 1. Close the connection from the variable in Task 1.4 2. Close the connection from the variable in Task 1.5

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions