
Please help me with this code in C++, I dont know to write a menu for this. Please help me create a Film.h, Film.cpp, Main, and A Menu. thank you!!
Develop a high-quality, menu-driven object-oriented C++ program that creates a small
Your program must include:
- a Film class that stores all the data for a Film and provides appropriate methods to support good software engineering principles,
- a FilmDatabase class that stores the binary search tree and provides appropriate methods in support of database queries and reporting using good software engineering principles,
- an application that interacts with the end-user. The design is up to you and may include any number of classes in support of the given application. A Menu class is strongly recommended.
Note that the binary search tree must store Film objects, and the >, <, and == operators must be defined for that class because the BinarySearchTree class uses those overloaded operators.
Data Details:
The database contains data pertaining to the 100 highest grossing films of 2017. A comma delimited file named Films2017.csv contains the initial data. Each record is stored on one line of the file in the following format:
Data | Data type |
Rank | int |
Film Title (key) | string |
Studio | string |
Total Gross | double |
Total Theaters | int |
Opening Gross | double |
Opening Theaters | int |
Opening Date | string |
Each of the data fields is separated in the file using the comma (,) character as a delimiter. There is no comma (,) character after the last field on the line. The data is considered clean; There are no errors in the input file.
When storing the data in the binary search tree, use the data types shown above. The Film Title will serve as the key field. Therefore, an inorder traversal of the BST will produce the Films in order of title.
The menu system consists of a main menu and sub-menus. All menu choices are selected by entering the letter of the desired choice. After a selection is processed, the current menu should be re-displayed. Do NOT use recursion to do this; use a loop. The current menu continues until the X option (return to main menu or exit) is selected.
When the application begins, the following main menu should be displayed:
MAIN MENU
A - About the Application
R - Reports
S - Search the Database
X - Exit the Program
Enter Selection ->
BinaryTreeADT.H:
#ifndef BINARYTREEADT_H
#define BINARYTREEADT_H
template <class T>
class BinaryTreeADT {
public:
virtual bool isEmpty() const = 0;
virtual bool add(const T& newItem) = 0;
virtual bool remove(const T& delItem) = 0;
virtual void clear() = 0;
virtual bool contains(const T& findItem) const = 0;
virtual void inorderTraverse(void visit(T&)) const = 0;
private:
};
#endif /* BINARYTREEADT_H */
BinarySearchTree.H:
#ifndef BINARYSEARCHTREE_H
#define BINARYSEARCHTREE_H
#include "BinaryTreeADT.h"
#include "BinaryNode.h"
template <class T>
class BinarySearchTree : BinaryTreeADT<T> {
public:
BinarySearchTree();
BinarySearchTree(const BinarySearchTree& orig);
virtual ~BinarySearchTree();
//interface methods
bool isEmpty() const;
bool add(const T& newItem);
bool remove(const T& delItem);
void clear();
bool contains(const T& findItem) const;
void inorderTraverse(void visit(T& item)) const;
private:
BinaryNode<T>* root;
//recursive methods
void destroyTree(BinaryNode<T>* currRoot);
BinaryNode<T>* copyTree(const BinaryNode<T>* currRoot) const;
BinaryNode<T>* placeNode(BinaryNode<T>* currRoot, BinaryNode<T>* newNode);
bool findNode(BinaryNode<T>* currRoot, const T& item) const;
void inorder(BinaryNode<T>* currRoot, void visit(T& item)) const;
};
#include "BinarySearchTree.cpp"
#endif /* BINARYSEARCHTREE_H */
BinaryNode.H:
#ifndef BINARYNODE_H
#define BINARYNODE_H
template <class T>
class BinaryNode {
public:
BinaryNode();
BinaryNode(const T& newItem,
BinaryNode<T>* left = nullptr,
BinaryNode<T>* right = nullptr);
BinaryNode(const BinaryNode& orig);
virtual ~BinaryNode();
T getItem() const;
void setItem(const T& newItem);
BinaryNode<T>* getLeftChild() const;
BinaryNode<T>* getRightChild() const;
void setLeftChild(BinaryNode<T>* left);
void setRightChild(BinaryNode<T>* right);
bool isLeaf() const;
private:
T item;
BinaryNode<T>* leftChild;
BinaryNode<T>* rightChild;
};
#include "BinaryNode.cpp"
#endif /* BINARYNODE_H */



Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

- Ro-Sham-Bo. Believe it or not, the classic game of Rock-PaperScissors has many other names. One of them is Ro-Sham-Bo. For this assignment, “Ro” will represent “Rock”, “Sham” will represent Paper, and “Bo” will represent Scissors. You will create a RoshamboPlayer class in C++. It will have three attributes: PlayerName: String RoLimit: int ShamBoLimit: int It will also have an overloaded constructor that sets those three values. It will have two functions: playRound that takes in a string and returns a boolean value, and getName that takes in nothing and returns the PlayerName string. In your driver class for this assignment, you will create two RoshamboPlayer objects with the following values: p1: RoLimit == 30, ShamBoLimit == 60 p2: RoLimit = 40, ShamBoLimit = 85 You may name them whatever you like. You will prompt the user to choose one of these two to play against. Then you will create a loop that prompt the user to either play a round of Roshambo, or quit the game. If the user…arrow_forwardplease in c++ im really struggling and would appreciate the help ill give like, down below i will leave the ADT LinkedSorterLists.h and .cpp c Question: Write an implementation using the ADT LinkedSorterList (textbook code) defining a list of runner objects. Create a Runner class with two attributes one is the time (hh:mm:ss) of the Time datatype and the other is the runner's name. The Time Class has three integer attributes and stores the time in military time format (Ex. 13:45:34). Your program determines the places of the runners. 16. Running the Race Write a program that asks for the names of three runners and the time it took each of them to finish a race. The program should display who came in first, second, and third place. Input Validation: Only accept positive numbers for the times. (Gaddis T. 2018)arrow_forwardWRITE IN C++ A Date class is described by month(m), day(d), year(y). An Employee is described by a unique data structure having a name (e.g. “George”), salary(75000.25) and date_of_birth (06, 10, 1998). Calculate the number of days between his day of birth and (09, 20, 2023). Assume that the Employee object contains a Date sub-object)arrow_forward
- Write a C++ program that simulates a two-dimensional random walk along a grid that has M by N function parameters.The walker moves in one of four directions. The walker chooses the direction randomly. The walker cannot move off the grid. The function ends when the walker visits every grid position at least once. The function returns a dynamic structure that is an ordered record of the walker's positions over time. The first element of the structure is the walker's first position. The last element is the walker's last position.arrow_forwardImplement a C++ program:RESTAURANT that has multiple branches, and each branch has menus of food items, their stock and a list of customers. A branch may have for example a breakfast menu and lunch menu with different food items, and the stock (available quantity) of each food item in the branch. Also, the branch will have a list of regular customers and their contact information to contact them for offers and new food items. Class Names Data and Member Functions Food Data Members: ID, Name, Calories, Price Member Functions: getID, getName, getCalories, getPrice setID, setName, setCalories, setPrice Stock Data Members: ID, Food, Stock Member Functions: getID, getFood, getStock setID, setFood, setStock Customer Data Members: ID, Name, Phone Member Functions: getID, getName, getPhone setID, setName, setPhoe Menu Data Members: ID, Name, foodList Member Functions: getID, getName, getFoodList setID, setName Branch Data Members: ID, Address, menuList, stockList, customerList Member…arrow_forwardImplement a C++ program for a RESTAURANT that has multiple branches, and each branch has menus of food items, their stock and a list of customers. A branch may have for example a breakfast menu and lunch menu with different food items, and the stock (available quantity) of each food item in the branch. Also, the branch will have a list of regular customers and their contact information to contact them for offers and new food items. Class Names Data and Member Functions Food Data Members: ID, Name, Calories, Price Member Functions: getID, getName, getCalories, getPrice setID, setName, setCalories, setPrice Stock Data Members: ID, Food, Stock Member Functions: getID, getFood, getStock setID, setFood, setStock Customer Data Members: ID, Name, Phone Member Functions: getID, getName, getPhone setID, setName, setPhoe Menu Data Members: ID, Name, foodList Member Functions: getID, getName, getFoodList setID, setName Branch Data Members: ID, Address, menuList, stockList, customerList Member…arrow_forward
- Elevator (or Lift as referred to by the English folks) Simulator in C language program.Simulate an Elevator-Controller Program. The Elevator should be able to travel between five floorsnamely Ground, 1st, 2nd, 3rd, 4th and 5th floors. The elevator can travel going up (unless they areat the 5th floor) or going down (unless they are at the ground floor). The elevator can only containone passenger (which is the current user of the program). Initially the elevator begins and loads atthe Ground Floor. If the user wants to travel to the 5th floor, the elevator shall go up to the saidfloor. It is the option of the user if they want to alight the elevator or not on the 5th floor or anyfloor on the way. Realistic rules should apply: If the user alights at the 4th floor, when they ride the elevator again, itshould begin traveling from the 4th floor and from there choose to go up or down. Your programshould have some validation: meaning, only the valid characters should be received by the…arrow_forwardI would much appreciate it if someone could elaborate on the concept of data encapsulation as it applies to object-oriented programming in Java.arrow_forwardCould you help explain the notion of "Data Encapsulation" in Java and how it relates to "Object-Oriented Programming"?arrow_forward
- Write Java code Objectives •Use an abstract data type for a list •Use a method that contains an Object type as a formal parameter •Use methods in an existing class •Access data members within a class Required Files: •ListInterface.java •ListException.java •ListOutOfBoundsException.java •ListArrayBased.java Description A list is an abstract data type used to store ordered data, and contains operations that fall into the following categories: (1) add data to a data collection, (2) remove data from a data collection, and (3) ask questions about data in a data collection. The operations which ask questions about the data in a data collection may include operations that determine if a data collection is empty, determine the size of a data collection, and retrieve the item at a given position in a data collection. A list should be able to contain any type of object. The methods for the List support any object as specified in the interface. In this assignment, the objects will be S trings.…arrow_forwardCould you help explain the notion of "Data Encapsulation" in Java and how it relates to "Object-Oriented Programming"?arrow_forwardCould you help explain the notion of "Data Encapsulation" in Java and how it relates to "Object-Oriented Programming"?arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





