Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to write a program which reads an ASCII text file named movies.txt with movie information, and then allows the user to query various

image text in transcribed

You are to write a program which reads an ASCII text file named "movies.txt" with movie information, and then allows the user to query various information about the movie(s). File format input: The file will consist of one or more pairs of lines in the following format: Theatre number (int), movie name (string), movie rating (string), movie length in minutes (int) Start time 1, start time 2, start time 3, start time N Each start times will be a string in 24 hour time format (i.e 8:00 or 21:30 for 8am or 9:30pm). Start times are separated by commas. It is up to you whether you want to read the start times as strings or Date Time, and whether to convert them to DateTime. Theatre number may not begin with 1, may not be contiguous, and may not be in any order. There may be any number of theatres, and any number of start times (a list might be a good data structure to consider). Once the file is read, the user must be able to enter any of the following commands and have the program perform the required action: A- Print a list of all movies and corresponding theatre numbers M Print information about a specific movie. Prompt user to enter theatre number, and then print all information about that movie (theatre number, title. and rating) T- Print time information about a specific movie. Prompt user to enter theatre number, and then print the movie name and the start and end times for each showing F- Find all movies that begin within a specified time frame. The program should prompt the user for a time and the number of minutes. Then print a list of all movies that begin within the specified number of minutes from the specified time (either before or after). Be sure to consider/test cases when a movie begins at 23:00 and lasts for 120 minutes (a day boundary is crossed). X- Exits the program. You must create and use a Movie class to implement this program. The movie class shall have a List within it to store the start times of the movie. Your main program should have a List or type Movie. Which shall store all of the movie information

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

Students also viewed these Databases questions