Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program, with a graphical user interface, that allows users to create genealogy trees and work with person this genealogy tree will be restricted

image text in transcribed
image text in transcribed
write a program, with a graphical user interface, that allows users to create genealogy trees and work with person this genealogy tree will be restricted to having at most two children. The nodes of the tree store string which are interpreted as of people. The program should support the following commands: root name: Adds name as the root of the tree. This must be the first command creates a tree with a single node, whose value field holds name. The created node becomes the root of the genealogy tree. The command is ignored if it is entered after the tree has been created. left parent child: Adds a new node child as the left child of the node with name parent. The command is ignored if there is no node with name parent in the tree, or if there is such a node, but it already has a left child. right parent child: Adds a new node child as the right child of the node with name parent. The command is ignored if there is no node with name parent in the tree, or if there is such a node, but it already has a right child. descendants person: Displays a list of all descendants of the node with name person. The command is ignored if there is no node in the tree with that name. ancestors person: Displays a list of all ancestors of the node with the name person. The command is ignored if there is no node in the tree with that name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

word format please k=1nk21O(1)

Answered: 1 week ago