Giter Club home page Giter Club logo

prjbapq's Introduction

Family Tree Assignment (prjBAPQ)

Write a program, with a graphical user interface, that allows the user to create genealogy trees and work with them. Each person in this genealogy tree will be restricted to having at most two children. The nodes of the tree will store string values, which are interpreted as names 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 entered: it 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 the 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 the 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 the descendants of the node with name person. The command is ignored if there is no node 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.


Added commands for convenience:

clear: Clears the text area for better readability this does not clear the binary tree

prjbapq's People

Contributors

aspiringit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.