Question: Create a C + + decision tree that asks the user for a filename It must ask the user for a filename. It must open

Create a C++ decision tree that asks the user for a filename
It must ask the user for a filename.
It must open and read a file with the provided name, with .txt appended to it. For
example, if the user provides the file name tree, the program must open and read
the file tree.txt.
The file must contain a textual description of a binary decision tree as in the
example above.
This file must specify a tree of your own design. It is suggested to design a tree on a
topic you like, or a hobby, or something you are interested in and are knowledgeable
about.
The tree must have at least five question nodes; there is no upper limit.
After reading the file, the program must walk the user through the tree until a
decision is reached.
The program must use at least one function, which should read the provided file and
return a tree. This function must be present in a separate file. The prototype of this
function should be:
vector readtree(ifstream &);
The function argument is an input file stream; the function assumes that the file was
already opened successfully, so it can start reading from the stream directly. Here,
Node is a struct defined as in the slides on pointers and in Lab #12.
A header file must be provided.
Create a C + + decision tree that asks the user

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 Programming Questions!