Unknown number of movies are stored in a file named movies.txt. Each line consists of a movie type (A for Action, H for Horror and D for Drama), movie rating out of 10.0 and movie name. The maximum number of movies in the file is 100. Write a program that reads the data into three paraliel arrays. Then prompt the user to input the movie type and minimum rating. Then, the program should: (a) count and display the total number of movies in the file. (b) count and display the number of movies according to the selected type. (c) Display all the movie details of the selected type whose rating is equal or exceed the minimum rating. Sample /o of the program is shown in the example below. movies.txt (input file) Screen Output A The Fast & the Furious 7 Enter Movie Type: D 7.5 5.9 The Others Enter Minimum Rating: 7.8 D 9.1 Titanic The total number of movies is 61 The number of movies of type D is 9 The movies of type D with rating of 7.8 or above are: Movie Name Rating D 4.2 Message in a Bottle D 7.8 Brave Heart Titanic 9.1 Brave Heart 7.8

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Unknown number of movies are stored in a file named movies.txt. Each line consists of a movie
type (A for Action, H for Horror and D for Drama), movie rating out of 10.0 and movie name. The
maximum number of movies in the file is 100.
Write a program that reads the data into three paraliel arrays. Then prompt the user to input the
movie type and minimum rating. Then, the program should:
(a) count and display the total number of movies in the file.
(b) count and display the number of movies according to the selected type.
(c) Display all the movie details of the selected type whose rating is equal or exceed the
minimum rating.
Sample 1/0 of the program is shown in the example below.
movies.txt (input file)
Screen Output
A
7.5
The Fast & the Furious 7
Enter Movie Type: D
5.9
The Others
Enter Minimum Rating: 7.8
D
9.1
Titanic
4.2
Message in a Bottle
The total number of movies is 61
The number of movies of type D is 9
.......
The movies of type D with rating of 7.8 or above are:
D.
7.8
Brave Heart
Movie Name
Rating
Titanic
9.1
Brave Heart
7.8
Transcribed Image Text:Unknown number of movies are stored in a file named movies.txt. Each line consists of a movie type (A for Action, H for Horror and D for Drama), movie rating out of 10.0 and movie name. The maximum number of movies in the file is 100. Write a program that reads the data into three paraliel arrays. Then prompt the user to input the movie type and minimum rating. Then, the program should: (a) count and display the total number of movies in the file. (b) count and display the number of movies according to the selected type. (c) Display all the movie details of the selected type whose rating is equal or exceed the minimum rating. Sample 1/0 of the program is shown in the example below. movies.txt (input file) Screen Output A 7.5 The Fast & the Furious 7 Enter Movie Type: D 5.9 The Others Enter Minimum Rating: 7.8 D 9.1 Titanic 4.2 Message in a Bottle The total number of movies is 61 The number of movies of type D is 9 ....... The movies of type D with rating of 7.8 or above are: D. 7.8 Brave Heart Movie Name Rating Titanic 9.1 Brave Heart 7.8
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education