[Solved]Designing Implementing Database Academy Award Winners R1 R2 Read Information Moviescsv Fil Q37263575
You are designing and implementing a database for the AcademyAward winners.
R1/R2: You are to read in information from movies.csv files.
R2: Then you will read in information about the movies that havewon best picture award.
Place these items in a Binary Search Tree, sorted by name. This isalso formatted as a .csv file
The first line of pictures.csv contains the data fieldsincluding: name, year, nominations, rating, duration, genre1,genre2, release, metacritic, synopsis
R3/R4: Choose the movie database and add a record
R5/R6: Choose the movie database, search for a record, and modifythe fields.
R7/R8: Choose the movie database, search for a record and deletethe fields.
R9/R10: Choose the movie database and sort by any single(sortable) field
R11/R12: Choose the movie database and do a complete search onany “complete” searchable field. It is unlikely that you would havean exact match on an entire description, so that would not belisted to search.
R13/R14: Choose the movie database and do a partial search onany searchable field. A partial search is any substring within afield.
R15/R16: Choose the movie database, ask for a file name, andprint out a .csv file of the latest database (after adds, deletesor modifies). Remember that the first line of a .csv file lists thename of the fields separated with commas, ending in a newline. Thenthe following lines are the information from the fields separatedwith commas, ending in a newline.
my code so far:
movie.h
#ifndef CODE_MOVIE_H#define CODE_MOVIE_H#include<iostream>#include<string>using namespace std;class NodeMovie{ NodeMovie(); NodeMovie(string name, int year, int nominations, double rating, string genre1, string genre2,NodeMovie* left, NodeMovie* right){} void setKey(string key){}public: string key; NodeMovie* leftNode; NodeMovie* rightNode;};class MovieBST{private: NodeMovie* root; void addRecord(NodeMovie *node_to_add,NodeMovie *subtree_root ); void Print(ostream& stream,NodeMovie* subtree_root); void deleteRecord(NodeMovie *node_to_delete ) string name; int year; int nominations; double rating; string genre1; string genre2; string release; int metacritic; string synopsis;public: MovieBST(); void setKey(string key){}; string key(); void AddRecord(NodeMovie* leaf); // function that will add a record void ModifyRecord(string, int ); // function that will modify a record void DeleteRecord(NodeMovie* leaf); // function that will delete a record void Print(ostream& stream); // function that will export to file //getters string getName(){return name}; int getNomination(){return nominations}; double getRating(){return rating;}; string getGenre1(){return genre1;}; string getGenre2(){return genre2;}; string getRelease(){return release;}; int getMetacritic(){return metacritic;}; string getSynopsis(){return synopsis;}; //setters void setName(string _name); void setNomination(int _nominations); void setRating(double _rating); void setGenre1(string _genre1); void setGenre2(string _genre2); void setRelease(string _release); void setMetacritic(int _metacritic); void setSynopsis(string _synopsis);};#endif //CODE_MOVIE_H
movie.cpp
#include<iostream>#include <string>#include <fstream>#include “Movie.h”using namespace std;void MovieBST::AddRecord(NodeMovie *leaf){ //No elements add the root and set the key if (root == NULL) { // NodeActor *node = new NodeActor(); //node->setKey(key); root = leaf; } // add a node else addRecord(leaf, root);}void MovieBST::addRecord(NodeMovie *node_to_add, NodeMovie *subtree_root){ if (subtree_root == nullptr) subtree_root = node_to_add; else if (node_to_add->key < subtree_root->key) addRecord(node_to_add, subtree_root->leftNode); else if (node_to_add->key > subtree_root->key) addRecord(node_to_add, subtree_root->rightNode);}//Print Functionsvoid MovieBST::Print(ostream &stream){ Print(stream, root);}void MovieBST::Print(ostream &stream, NodeMovie *subtree_root){ if(subtree_root!= nullptr) { Print(stream, subtree_root->leftNode); stream << subtree_root->key << ” “; Print(stream, subtree_root->rightNode); }}
movie.csv file example

0 metacritic symopsis nominations rating duratio enrel 119 Comed Drama Nowember 134 Biograp Drama November 120 Bioeraphy Drama 100 Comedy 118 Biography Drama December 131 Drama 120 Drama Romance January 122 CrimeDrama November 51 Crime Drama October 112 Drama 132 Drama Sport 88 llustrated upon the progress of his latest Broadway play a former popular actors struerle to cope with his current life as a wasted actor is shown. 7 Inthe antebellum United 5tates Solomon Northup a free black man from upstate New York is abducted and sold into slavery. 86 Actine under the cover of a Hollywood producer scoutine a location for a science fiction film a aA agent launches a dangerous operation to rescue six Ame 89 A silent move star meets a young dancer but the arrival of talkine pictures sends their careers in opposi te directions. 88 The story of King Georee VI of the United Kirgdom of Great Britain and Northern Ireland his impromptu ascension to the throne and the speech therapist w M During the Irao Wara Sergeant recently assigned to an army bomb squad is put at odds with his squad mates due to his maverick way of handling his work 86 A Mum bai teen reflects on his upbrineine in the slums when he is accused of cheating on the Ind an Version of Who Wants to be a Millionaire? 91 Violence and mayhem ensue after a hunter stumbles upon a drug deal gone wrong and more than two million dollars in cash near the Rio Grande 86 An undercover cop and a mole in the police attempt to idefyeach other while infiltrating an Irish gang in South Boston. 69 Los Angeles citizens with vastly separate lives collide in interweaving stories of race loss and redemption. 86 A determined woman works with a hardened boxing trainer to become a professional. Birdman 12 7.8 Years as 2013 DaOctober Drama October The Kine’s 5 The Hurt Loc 5lumdoe Mi No Country1 The Departe 2009 8.1 10 7.9 8.1 12 Mllion Dolla Show transcribed image text 0 metacritic symopsis nominations rating duratio enrel 119 Comed Drama Nowember 134 Biograp Drama November 120 Bioeraphy Drama 100 Comedy 118 Biography Drama December 131 Drama 120 Drama Romance January 122 CrimeDrama November 51 Crime Drama October 112 Drama 132 Drama Sport 88 llustrated upon the progress of his latest Broadway play a former popular actors struerle to cope with his current life as a wasted actor is shown. 7 Inthe antebellum United 5tates Solomon Northup a free black man from upstate New York is abducted and sold into slavery. 86 Actine under the cover of a Hollywood producer scoutine a location for a science fiction film a aA agent launches a dangerous operation to rescue six Ame 89 A silent move star meets a young dancer but the arrival of talkine pictures sends their careers in opposi te directions. 88 The story of King Georee VI of the United Kirgdom of Great Britain and Northern Ireland his impromptu ascension to the throne and the speech therapist w M During the Irao Wara Sergeant recently assigned to an army bomb squad is put at odds with his squad mates due to his maverick way of handling his work 86 A Mum bai teen reflects on his upbrineine in the slums when he is accused of cheating on the Ind an Version of Who Wants to be a Millionaire? 91 Violence and mayhem ensue after a hunter stumbles upon a drug deal gone wrong and more than two million dollars in cash near the Rio Grande 86 An undercover cop and a mole in the police attempt to idefyeach other while infiltrating an Irish gang in South Boston. 69 Los Angeles citizens with vastly separate lives collide in interweaving stories of race loss and redemption. 86 A determined woman works with a hardened boxing trainer to become a professional. Birdman 12 7.8 Years as 2013 DaOctober Drama October The Kine’s 5 The Hurt Loc 5lumdoe Mi No Country1 The Departe 2009 8.1 10 7.9 8.1 12 Mllion Dolla
Expert Answer
Answer to You are designing and implementing a database for the Academy Award winners. R1/R2: You are to read in information from … . . .
OR

