Question: write the definition for the following functions in c++ format #ifndef MOVIETREE_H #define MOVIETREE_H #include struct MovieNode { int ranking; std::string title; int year; int

write the definition for the following functions in c++ format

#ifndef MOVIETREE_H #define MOVIETREE_H

#include

struct MovieNode { int ranking; std::string title; int year; int quantity; MovieNode *parent; MovieNode *leftChild; MovieNode *rightChild;

MovieNode(){};

MovieNode(int in_ranking, std::string in_title, int in_year, int in_quantity) { ranking = in_ranking; title = in_title; year = in_year; quantity = in_quantity;

parent = leftChild = rightChild = nullptr; } };

class MovieTree { public: MovieTree(); ~MovieTree(); void printMovieInventory(); void addMovieNode(int ranking, std::string title, int releaseYear, int quantity); void findMovie(std::string title); void rentMovie(std::string title);

private: MovieNode *search(MovieNode *node, std::string title); void Printhelp(MovieNode *printTree); MovieNode *root; };

#endif // MOVIETREE_H

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!