Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please, do include your comments in the code so that i can understand. 7. Basic Binary Trees Just in case you ever own a chicken
please, do include your comments in the code so that i can understand.
7. Basic Binary Trees Just in case you ever own a chicken farm, you're going to make a binary tree to store all their chickenly records. For each chicken, the following pieces of information will be stored: first name, last name, birthday, weight (in ounces). Yes, modern chickens have two names, just like people a. Define a struct suitable for representing a chicken. b. Define a struct and its constructor suitable for representing a node in a bina tree of chickens. C. Add a function that will add a new chicken to a tree. The tree should be ordered alphabetically on the chickens' last names. If two chickens have the same last name, break the tie by using their first names d. Add a function that will search a tree to find a chicken with given first and last names (parameters). Be sure that your function behaves in a reasonable way if no such chicken can be foundStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started