Overview: The Movie Genre Search Application is a C++ program designed to facilitate users in exploring a curated list of the top 50 movies of all time based on their genres. The application allows users to input a specific movie genre of interest, and it returns a list of movies within that genre along with relevant details such as title, release year, rating, duration, genres, and consumer rating.
TechStack Used:
C++, Data Structures and Algorithms, Modular Approach
Key Features:
Interactive Genre Search:
Users are prompted to enter a movie genre to initiate the search.
The application then displays a list of movies belonging to the specified genre.
Detailed Movie Information:
The application provides comprehensive details for each movie, including title, release year, rating, duration, genres, and consumer rating.
Top 50 Movie Collection:
The program loads data from an external file ("movies.dat") containing information about the top 50 movies.
It ensures robust handling of data, allowing users to explore a diverse range of movies.
User-Friendly Interface:
The application features a user-friendly interface with clear instructions and prompts.
Users can easily navigate through the genre search process.
Technical Details:
Data Structure:
Utilizes a C++ structure named "Movie" to encapsulate information about each movie, promoting code modularity.
Stores movie data in an array of structures, accommodating up to 50 movies.
File Handling:
Implements file handling to read movie data from the "movies.dat" file.
Ensures proper opening and closing of the data file for seamless data retrieval.
Genre Matching:
Employs a function ("hasGenre") to determine whether a movie contains the specified genre.
Utilizes string manipulation functions to compare genres.
Input Validation:
Incorporates functions ("readTitle," "readYear," etc.) for robust input validation while reading movie details from the data file.
Dynamic Genre Parsing:
Parses the genre information from a comma-separated string in the data file into an array of strings, enhancing flexibility.
User Interaction:
Engages users in an iterative process, allowing them to conduct multiple genre searches.
Prompts users with a clear option to continue or exit the application.
Conclusion: The Movie Genre Search Application combines functionality, data integrity, and user-friendly design to offer an efficient platform for exploring top movies based on user preferences. Its structured approach to file handling, data parsing, and user interaction make it a valuable tool for movie enthusiasts seeking a curated selection based on genres.