Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Whitespace error doesn't work by removing in the output method. movies.csv listed below. Write a program that reads movie data from a csv (comma separated

Whitespace error doesn't work by removing in the output method. movies.csv listed below.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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 (l) in each row. - Column 1 displays the movie titles and is left justified with a minimum of 44 characters. - If the movie title has more than 44 characters, output the first 44 characters only. - Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. - Column 3 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. Ex: If the input of the program is: movies. csv and the contents of movies.csv are: 16:40, Wonders of the World, G 20:00, Wonders of the World, G 19:00, Journey to Space ,PG-13 12:45, Buffalo Bill And The Indians or Sitting Bull's History Lesson, PG 15:00, Buffalo Bill And The Indians or Sitting Bull's History Lesson, PG 19:30, Buffalo Bill And The Indians or Sitting Bull's History Lesson, PG 10:00, Adventure of Lewis and Clark, PG-13 14:30, Adventure of Lewis and Clark, PG-13 19:00, Halloween, R the output of the program is: LabProgram.java Load default template... rect, but whitespace differs. See highlights below. \begin{tabular}{|c|} \hline \\ \hline 1 \\ \hline 2 \\ \hline 3 \\ \hline 4 \\ \hline 5 \\ \hline 6 \\ \hline 7 \\ \hline 8 \\ \hline 9 \\ \hline 10 \\ \hline 11 \end{tabular} A B C \begin{tabular}{|l|l|} \hline 16:40 Wonders of the World & G \\ \hline 20:00 Wonders of the World & G \\ \hline 19:00 Journey to Space & PG-13 \\ \hline 12:45 Buffalo Bill And The Indians or Sitting Bull's History Lesson & PG \\ \hline 15:00 Buffalo Bill And The Indians or Sitting Bull's History Lesson & PG \\ \hline 19:30 Buffalo Bill And The Indians or Sitting Bull's History Lesson & PG \\ \hline 10:00 Adventure of Lewis and Clark & PG-13 \\ \hline 14:30 Adventure of Lewis and Clark & PG-13 \\ \hline 19:00 Halloween & R \\ \hline \end{tabular}

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago

Question

1. Understand how verbal and nonverbal communication differ.

Answered: 1 week ago