Program of binary tree, C/C++ Programming

Assignment Help:

Program of Binary tree:

Btree::Btree(int O) : itemsInContainer(0)

{

    finishInit(O);

}

 

Btree::~Btree(void)

{

    if( root != 0 )

        delete root;

}

 

void Btree::flush( DeleteType dt )

{

    int oldValue = ownsElements();

    ownsElements( delObj(dt) );

    if( root != 0 )

        delete root;

    itemsInContainer = 0;

    root = 0;

    ownsElements( oldValue );

}

 

int Btree::hasMember( Object& o ) const

{

    if( !o.isSortable() )

        ClassLib_error( __ENOTSORT );

    if( root == 0 )

        return 0;

    else

        {

        Node* loc;

        int idx;

        return root->found(&(Sortable&)o, &loc, &idx) != NOOBJECT;

        }

}


Related Discussions:- Program of binary tree

Specifying and working rules of a class, Specifying a Class: As discuss...

Specifying a Class: As discussed a class is defined to develop an algorithm and bind it together in a core shell. A class is an abstract data type (ADT).  The binding of dat

Area under curve., find the c program to find area under the curvey=f(x) ...

find the c program to find area under the curvey=f(x)   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area;

Static data members and static member function, Static Data Members: A ...

Static Data Members: A data member inside the class can construct as static data member.   There are few guidelines to be followed when declaring static data member.

Palindrome, Problem : Change to palindrome A palindrome is a string that r...

Problem : Change to palindrome A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your ta

Graphical user interface designed for the output peripherals, Introduction ...

Introduction to I/O interfacing, discuss microcontrollers applications in industry. Detailed product design specifications that have sections on both hardware and software inclu

Described container class?explain types of container class, A container cla...

A container class is a class which is used to hold objects in external storage and memory. A container class work as a generic holder. A container class contains a predefined behav

Is it possible to create your own header files, Is it possible to create yo...

Is it possible to create your own header files? - Yes, it's possible to create a customized header file. - To do this, you just need to include function prototypes that you

Change to palindrome, A palindrome is a string that reads the same from bot...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Memory allocation for objects, when a class is defined the compiler will no...

when a class is defined the compiler will not allocate memory. This is true only for data member not for member function.  As soon as the member function is defined  the require

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd