Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective The objective of this homework is to: Develop a custom C++ class to encapsulate Movie information. Continue to review the use of file streams

image text in transcribedimage text in transcribedimage text in transcribed

Objective The objective of this homework is to: Develop a custom C++ class to encapsulate Movie information. Continue to review the use of file streams for text file I/O Further understand the use of std::unordered map. Continue to gain familiarity with developing C++ program involving simple string manipulation Background In this homework you will be developing a simple program to process movie entries stored in a text file. Your program should enable the user to search the database and print relevant movie information. See sample outputs for commands and options. Data file format The supplied movies_db.txt has a space-separated data in the following columnar format: moveID "Title" year "Genres" ImdbID Rating #Raters Data Type int std::string Col# Name moveID title year genres imdbID int std::string int Description Unique ID for a movie e ID for a movie A double-quoted title for the movie The year when the movie was released A double-quoted list of genres for the movie The IMDB (Internet Movie Data Base) identifier for the movies An average movie rating (assigned by many reviewers) Number of reviewers who contributed to rating. rating float numRaters int Starter Code File Name Movie.h Description The header file to define a class called Movie with suitable instance variables to encapsulate the 7 fields for each Movie as listed in Data file format. This file have: 1. Constructor 2. Destructor 3. Stream-insertion operator 4. Stream-extraction operator 5. A to string method The source file that implements the methods associated with the Movie class. This class must contain all the necessary logic associated with loading, finding, searching and listing movies as discussed below. This file use an std:: unordered map to manage movie entries. Movie.cpp Homework3.cpp Sample outputs User inputs are shown in bold Enter a command: exit Enter a command: find 1 1 "Toy Story" 1995 "AdventurelAnimation|Children ComedylFantasy" 114709 3.92093 215 Enter a command: find 36000 Movie with ID 36000 not found in database. Enter a command: search Titanic 4864 "Titanica" 1992 "Documentary|IMAX" 105601 2.5 1 3403 "Raise the Titanic" 1980 "Drama Thriller" 81400 4 1 3404 "Titanic" 1953 "Action Drama" 46435 3.58333 6 1721 "Titanic" 1997 "Drama Romance" 120338 3.41429 140 Found 4 matche(s). Enter a command: list 4061 "The Man in the Moon" 1991 "Drama Romance" 102388 42 39414 "Shopgirl" 2005 "Comedy Drama Romance" 338427 3 7 851 "Basquiat" 1996 "Drama" 115632 2.83333 6 848 "Spitfire Grill, The" 1996 "Drama" 117718 3.28571 7 78746 "Best Worst Movie" 2009 "Documentary" 1144539 41 4051 "Horrors of Spider Island (Ein Toter Hing im Netz)" 1960 "Horror Sci-Fi" 56600 0.51 81949 "Romantics, The" 2010 "Comedy Drama Romance" 1403988 31 842 "Tales from the Crypt Presents: Bordello of Blood" 1996 "Comedy Horror" 117826 2.54167 12 840 "House Arrest" 1996 "Children Comedy" 116571 3.375 4 839 "Crow: City of Angels, The" 1996 "Action Thriller" 115986 2.83333 15 7266 "Lost Skeleton of Cadavra, The" 2002 "Comedy Horror Sci-Fi" 307109 4 7263 "Miracle" 2004 "Drama" 349825 3.35 10 72178 "Welcome to Dongmakgol" 2005 "Comedy DramalWar" 475783 4.5 1 4042 "Alamo, The" 1960 "ActionDramalWar Western" 53580 3.375 4 833 "High School High" 1996 "Comedy" 116531 26 163056 "Shin Godzilla" 2016 "Action Adventure Fantasy Sci-Fi" 4262980 4 1 7260 "Latter Days" 2003 "Comedy Drama Romance" 345551 3.51 829 "Joe's Apartment" 1996 "Comedy Fantasy Musical" 116707 2.66667 9 313 "Swan Princess, The" 1994 "Animation Children" 111333 3.333333 52245 "Blades of Glory" 2007 "Comedy Romance" 445934 3.08824 17 7256 "Touching the Void" 2003 "Adventure Documentary" 379557 4 8 72171 "Black Dynamite" 2009 "Action Comedy" 1190536 3.5 2 824 "Kaspar Hauser" 1993 "Drama Mystery" 110246 41 7251 "Where the Day Takes You" 1992 "Drama" 105810 4 1 4221 "Necessary Roughness" 1991 "Comedy" 102517 2.625 4 Found 9742 entries. Objective The objective of this homework is to: Develop a custom C++ class to encapsulate Movie information. Continue to review the use of file streams for text file I/O Further understand the use of std::unordered map. Continue to gain familiarity with developing C++ program involving simple string manipulation Background In this homework you will be developing a simple program to process movie entries stored in a text file. Your program should enable the user to search the database and print relevant movie information. See sample outputs for commands and options. Data file format The supplied movies_db.txt has a space-separated data in the following columnar format: moveID "Title" year "Genres" ImdbID Rating #Raters Data Type int std::string Col# Name moveID title year genres imdbID int std::string int Description Unique ID for a movie e ID for a movie A double-quoted title for the movie The year when the movie was released A double-quoted list of genres for the movie The IMDB (Internet Movie Data Base) identifier for the movies An average movie rating (assigned by many reviewers) Number of reviewers who contributed to rating. rating float numRaters int Starter Code File Name Movie.h Description The header file to define a class called Movie with suitable instance variables to encapsulate the 7 fields for each Movie as listed in Data file format. This file have: 1. Constructor 2. Destructor 3. Stream-insertion operator 4. Stream-extraction operator 5. A to string method The source file that implements the methods associated with the Movie class. This class must contain all the necessary logic associated with loading, finding, searching and listing movies as discussed below. This file use an std:: unordered map to manage movie entries. Movie.cpp Homework3.cpp Sample outputs User inputs are shown in bold Enter a command: exit Enter a command: find 1 1 "Toy Story" 1995 "AdventurelAnimation|Children ComedylFantasy" 114709 3.92093 215 Enter a command: find 36000 Movie with ID 36000 not found in database. Enter a command: search Titanic 4864 "Titanica" 1992 "Documentary|IMAX" 105601 2.5 1 3403 "Raise the Titanic" 1980 "Drama Thriller" 81400 4 1 3404 "Titanic" 1953 "Action Drama" 46435 3.58333 6 1721 "Titanic" 1997 "Drama Romance" 120338 3.41429 140 Found 4 matche(s). Enter a command: list 4061 "The Man in the Moon" 1991 "Drama Romance" 102388 42 39414 "Shopgirl" 2005 "Comedy Drama Romance" 338427 3 7 851 "Basquiat" 1996 "Drama" 115632 2.83333 6 848 "Spitfire Grill, The" 1996 "Drama" 117718 3.28571 7 78746 "Best Worst Movie" 2009 "Documentary" 1144539 41 4051 "Horrors of Spider Island (Ein Toter Hing im Netz)" 1960 "Horror Sci-Fi" 56600 0.51 81949 "Romantics, The" 2010 "Comedy Drama Romance" 1403988 31 842 "Tales from the Crypt Presents: Bordello of Blood" 1996 "Comedy Horror" 117826 2.54167 12 840 "House Arrest" 1996 "Children Comedy" 116571 3.375 4 839 "Crow: City of Angels, The" 1996 "Action Thriller" 115986 2.83333 15 7266 "Lost Skeleton of Cadavra, The" 2002 "Comedy Horror Sci-Fi" 307109 4 7263 "Miracle" 2004 "Drama" 349825 3.35 10 72178 "Welcome to Dongmakgol" 2005 "Comedy DramalWar" 475783 4.5 1 4042 "Alamo, The" 1960 "ActionDramalWar Western" 53580 3.375 4 833 "High School High" 1996 "Comedy" 116531 26 163056 "Shin Godzilla" 2016 "Action Adventure Fantasy Sci-Fi" 4262980 4 1 7260 "Latter Days" 2003 "Comedy Drama Romance" 345551 3.51 829 "Joe's Apartment" 1996 "Comedy Fantasy Musical" 116707 2.66667 9 313 "Swan Princess, The" 1994 "Animation Children" 111333 3.333333 52245 "Blades of Glory" 2007 "Comedy Romance" 445934 3.08824 17 7256 "Touching the Void" 2003 "Adventure Documentary" 379557 4 8 72171 "Black Dynamite" 2009 "Action Comedy" 1190536 3.5 2 824 "Kaspar Hauser" 1993 "Drama Mystery" 110246 41 7251 "Where the Day Takes You" 1992 "Drama" 105810 4 1 4221 "Necessary Roughness" 1991 "Comedy" 102517 2.625 4 Found 9742 entries

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago