Page 1 of 1

(C++) You are to create a binary tree that contains information about pets. A pet struct has already been defined: struc

Posted: Sun May 15, 2022 8:05 am
by answerhappygod
(C++) You are to create a binary tree that contains information
about pets. A pet struct has already been defined:
struct pet
{ string name;
string species;
int weight;
int number_of_legs; };
a: Define a class to represent a binary tree of pointers to
pets. Give it a constructor that creates an empty tree.
b: Define a method that adds a new pet to the tree. Pets are to
be stored in alphabetical order based on their names.
c: define a method that prints the name, species, and weight of
every pet in the tree, in alphabetical order.