Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Process the input file When your program starts it must read all data from the file and process it . After processing the file, the

Process the input file
When your program starts it must read all data from the file and process it. After processing the file, the program must print the following message to stdout
"Processed file XYZ and parsed data for M movies"
where XYZ is the name of the file that has been process and M is the number of movies whose data has been processed (this will be 1 less than than the number of lines in the file because the first line has the column headers).
E.g., Processed file movies_sample_1.csv and parsed data for 24 movies
Interactive Functionality
Next your program should display a menus of interactive choices to the user and process the selected choice as described below. For the text of messages to print, see the section "Sample Program Execution."
1. Show movies released in a specified year
If the user chooses this option, then ask them to enter a year and
Display the names of all the movies released in that year, one on each line
If the data doesn't have any movies released in that year, print a message about this.
Your program can assume that the user will enter a 4 digit integer for the year between 1900 and 2021(inclusive of these years)
2. Show highest rated movie for each year
If the user chooses this option, then for each year for which at least one movie was released, display a movie that had the highest rating along with the year and the rating with one line per year.
In case of ties, display any one movie that had the highest rating that year.
Display the data in the form: YYYY RatingValue MovieTitle
The data doesn't have to be sorted by year or by rating value.
E.g.,
20108.5 Avengers: Infinity War
20128.1 The Avengers
3. Show movies and their year of release for a specific language
If the user chooses this option, ask them to enter a language and
For all movies released in the specified language
Display the year of release and the movie title, one line per movie
If the data doesn't include any movie released in this language, print a message about it.
You should only do an exact match on the language entered by the user
E.g., "English" shouldnt match "english"
You can assume that the length of the language string entered by the user will be less than 20 character.
4. Exit
If the user choose this option, the program should exit.
Notes:
For the interaction choice if the user enters an incorrect integer (i.e., something other than 1 to 4), print an error message and again present the 4 choices to the user.
You can assume that when the program asks user to enter an integer, the user will indeed enter an integer (i.e., you don't need to verify the data type of the user input).
Don't assume that the languages in the test file will be the same as the ones that appear in the sample file.
Dont make an assumption about the number of distinct languages that can appear in the test file.

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

LO2 Identify components of workflow analysis.

Answered: 1 week ago