Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Q 1 . A strictly binary tree is defined as a tree whose nodes are either leaf nodes or have 2 children. Write a recursive

Q1. A strictly binary tree is defined as a tree whose nodes are either leaf nodes or have 2
children. Write a recursive member function for the BinaryTree class that returns true if a tree
is a strictly binary tree, false otherwise.
Q2. Write a program to find the missing passengers of a flight to be used in an airport. First,
read the information of passengers (id and name) who have bought a ticket for a certain flight
from a text file and insert them into a Binary Search Tree sorted according to passenger
names. A samble text file is shown below:
Then from the keyboard, read the names of passengers who have boarded the plane and
delete them from the Binary Search Tree. Continue this process until 0 is inputted. To
announce the missing passengers at the airport, output the ids and names of all the
passengers alphabetically who have not yet boarded the plane as seen in the sample run.
Sample Run:
Enter passenger names who have boarded the plane ending with a 0 :
GulDemir
AhmetTurkoglu
...
0
Missing Passengers:
12004455 AhmetOzkan
11223344 CemilUzun
HEADER FILES...
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions