Question: In C + + Please. Write a program that reads movie data from a CSV ( comma separated values ) file and output the data
In C Please. Write a program that reads movie data from a CSV comma separated values file and output the data in a formatted table. The program
first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following
requirements:
Each row contains the title, rating, and all showtimes of a unique movie.
A space is placed before and after each vertical separator I in each row.
Column displays the movie titles and is left justified with a minimum of characters.
If the movie title has more than characters, output the first characters only.
Column displays the movie ratings and is right justified with a minimum of characters.
Column displays all the showtimes of the same movie, separated by a space.
Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive
rows.
Hints: Use the find function to find the index of a comma in each row of the text file. Use the substr function to extract texts separated by
the commas.
Ex: If the input of the program is:
movies.csv
and the contents of movies.csv are:
the output of the program is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
