Question: Create a C + + decision tree that asks the user for a filenameI = tr . 1 1 a myI I b . D
Create a C decision tree that asks the user for a filenameI
tr a myI
I
b
D
F
II IEMH.dIIUV
g
P
is
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 treetxt
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 readtreeifstream &;
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.
A header file must be provided.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
