class TreeNode:
    node_count = 0

    def __init__(self, parent, left_child, right_child):
        self.parent = parent
        self.left_child = left_child
        self.right_child = right_child
        TreeNode.node_count += 1

    def get_number_of_nodes(self):
        return TreeNode.node_count

class QuestionNode(TreeNode):
    question_count = 0

    def __init__(self, parent, question, no_child, yes_child):
        self.parent = parent
        self.question = question
        self.no_child = no_child
        self.yes_child = yes_child
        QuestionNode.question_count += 1

    def get_number_of_questions(self):
        return QuestionNode.question_count

class ItemNode(TreeNode):
    item_count = 0

    def __init__(self, item_name, bitmap, parent):
        self.item_name = item_name
        self.bitmap = bitmap
        self.parent = parent
        ItemNode.question_count += 1

    def get_number_of_items(self):
        return ItemNode.item_count

@@ -1,18 +1,14 @@
 class 
-Tree
 Node:%0A  
@@ -28,381 +28,105 @@
 = 0%0A
-%0A
     
-def __init__(self, parent, left_child, right_child):%0A        self.parent = parent%0A        self.left_child = left_child%0A        self.right_child = right_child%0A        TreeNode.node_count += 1%0A%0A    def get_number_of_nodes(self):%0A        return TreeNode.node_count%0A%0Aclass QuestionNode(TreeNode):%0A    question_count = 0%0A%0A    def __init__(self, parent, question, no
+bitmap = ''%0A    is_item = False%0A%0A    def __init__(self, is_item, bitmap, parent, left
 _child, 
 yes_
@@ -121,19 +121,21 @@
 _child, 
-yes
+right
 _child):
@@ -181,60 +181,54 @@
 elf.
-question = question%0A        self.no_child = no_child
+bitmap = bitmap%0A        self.is_item = is_item
 %0A   
@@ -237,19 +237,20 @@
    self.
-yes
+left
 _child =
@@ -254,11 +254,12 @@
 d = 
-yes
+left
 _chi
@@ -273,340 +273,60 @@
     
-QuestionNode.question_count += 1%0A%0A    def get_number_of_questions(self):%0A        return QuestionNode.question_count%0A%0Aclass ItemNode(TreeNode):%0A    item_count = 0%0A%0A    def __init__(self, item_name, bitmap, parent):%0A        self.item_name = item_name%0A        self.bitmap = bitmap%0A        self.parent = parent%0A        ItemNode.question
+self.right_child = right_child%0A        TreeNode.node
 _cou
@@ -356,20 +356,20 @@
 mber_of_
-item
+node
 s(self):
@@ -388,21 +388,21 @@
 urn 
-Item
+Tree
 Node.
-item
+node
 _cou

use one type of Node object only