Course Solutions Uncategorized (Solved) : Movietree Definition Leave File Modify Anything Pragma Include Movienode Node Struct Store Q35374750 . . . .

(Solved) : Movietree Definition Leave File Modify Anything Pragma Include Movienode Node Struct Store Q35374750 . . . .

 

/****************************************************************/
/* MovieTree Definition */
/****************************************************************/
/* LEAVE THIS FILE AS IS! DO NOT MODIFY ANYTHING! =] */
/****************************************************************/

#pragma once

#include

// MovieNode: node struct that will be stored in the MovieTreeBST

struct MovieNode
{
int ranking; // Rank of the movie
std::string title; // Title of the movie
int year; // Year this movie was released
float rating; // IMDB rating

MovieNode *parent = nullptr; // Pointer to the parent node
MovieNode *leftChild = nullptr; // Pointer to the leftchild
MovieNode *rightChild = nullptr; // Pointer to the rightChild

// default constructor
MovieNode(){}
// Parametrized constructor
MovieNode(int r, std::string t, int y, float q) : ranking(r),title(t),
year(y), rating(q) {}
};

// Class for storing and manipulating a tree ofMovieNode’s
class MovieTree
{
public:
// Check

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post