binary tree class

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

binary tree class

 
0
  #1
Aug 9th, 2005
what all do i have to do to make this work... this is my class and functions... and the errors are at the bottom...

do i have to overload operators or is there a much easier way? thanks.

and i know the return function isnt written yet.

  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. class binaryTree {
  7.  
  8. public:
  9.  
  10. binaryTree ();
  11. int menu ();
  12.  
  13. private:
  14.  
  15. typedef struct dataNode {
  16. char arriveCity[30];
  17. char departCity[30];
  18. int totalPassengers;
  19. int passengers;
  20. int flightNumber;
  21. struct dataNode * left;
  22. struct dataNode * right;
  23. };
  24.  
  25. dataNode * root;
  26.  
  27. bool insert (dataNode *&, dataNode &);
  28. bool search (dataNode *, dataNode &);
  29. bool retrieve (dataNode *, dataNode &);
  30. void inorder (dataNode *);
  31.  
  32. };
  33.  
  34. binaryTree::binaryTree() {
  35.  
  36. dataNode * root = NULL;
  37. dataNode * left = NULL;
  38. dataNode * right = NULL;
  39.  
  40. }
  41.  
  42. bool binaryTree::insert(dataNode*& tree, dataNode &flightNumber) {
  43.  
  44. if (tree == NULL) {
  45.  
  46. tree = new dataNode;
  47. tree -> left = NULL;
  48. tree -> right = NULL;
  49. tree -> flightNumber = flightNumber;
  50. return true;
  51.  
  52. }
  53. else if (flightNumber == tree -> flightNumber)
  54. return false;
  55. else if (flightNumber <= tree -> flightNumber)
  56. return insert (tree -> left, flightNumber);
  57. else
  58. return insert (tree -> right, flightNumber);
  59. }
  60.  
  61. bool binaryTree::search(dataNode * tree, dataNode &flightNumber) {
  62.  
  63. if (tree == NULL)
  64. return false;
  65. else if (flightNumber == tree -> flightNumber)
  66. return true;
  67. else if (flightNumber <= tree -> flightNumber)
  68. return search (tree -> left, flightNumber);
  69. else
  70. return search (tree -> right, flightNumber);
  71. }
  72.  
  73. bool binaryTree::retrieve (dataNode * tree, dataNode &flightNumber) {
  74.  
  75. }
  76.  
  77. void binaryTree::inorder (dataNode * tree) {
  78.  
  79. if (tree != NULL) {
  80.  
  81. inorder (tree -> left);
  82. cout << tree->flightNumber << endl;
  83. inorder (tree -> right);
  84.  
  85. }
  86. }
  87.  
  88. int binaryTree::menu () {
  89.  
  90. int choice;
  91.  
  92. cout << endl;
  93. cout << "Welcome to the JHD International Airport! How can we be of assistance?" << endl;
  94. cout << "Please select the best option for you:" << endl;
  95. cout << " 1. Create a new flight record." << endl;
  96. cout << " 2. Search for a flight." << endl;
  97. cout << " 3. End current program session." << endl;
  98. cin >> choice;
  99. cout << endl;
  100.  
  101. if (choice == 2) {
  102.  
  103. cout << "Please select the search option of your choice:" << endl;
  104. cout << " 1. Display all flight records." << endl;
  105. cout << " 2. Display all departing flights from a city." << endl;
  106. cout << " 3. Display all open flights." << endl;
  107. cout << " 4. Go back to the main menu." << endl;
  108. cin >> choice;
  109. cout << endl;
  110.  
  111. }
  112.  
  113. return choice;
  114.  
  115. }

C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp: In member
function `bool binaryTree::insert(binaryTree::dataNode*&,
binaryTree::dataNode&)':
C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp:49: error: cannot
convert `binaryTree::dataNode' to `int' in assignment
C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp:53: error: no
match for 'operator==' in 'flightNumber ==
tree->binaryTree::dataNode::flightNumber'
C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp:55: error: no
match for 'operator<=' in 'flightNumber <=
tree->binaryTree::dataNode::flightNumber'

C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp: In member
function `bool binaryTree::search(binaryTree::dataNode*,
binaryTree::dataNode&)':
C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp:65: error: no
match for 'operator==' in 'flightNumber ==
tree->binaryTree::dataNode::flightNumber'

C:/Documents and Settings/Josh/Desktop/JHD-cs111project6.cpp:67: error: no
match for 'operator<=' in 'flightNumber <=
tree->binaryTree::dataNode::flightNumber'
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

Re: binary tree class

 
0
  #2
Aug 9th, 2005
nevermind... got it.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

Re: binary tree class

 
0
  #3
Aug 9th, 2005
alright my insert function is:

  1. bool binaryTree::insert(dataNode*& tree, int &flightNumber) {
  2.  
  3. if (tree == NULL) {
  4.  
  5. tree = new dataNode;
  6. tree -> left = NULL;
  7. tree -> right = NULL;
  8. tree -> flightNumber = flightNumber;
  9. return true;
  10.  
  11. }
  12. else if (flightNumber == tree -> flightNumber)
  13. return false;
  14. else if (flightNumber <= tree -> flightNumber)
  15. return insert (tree -> left, flightNumber);
  16. else
  17. return insert (tree -> right, flightNumber);
  18. }

and im guessing i need to put the information thats typed in... here in the insert function too..

but im not sure how to do that... because i have always done just *current with the linked lists and im confused about doing it with the left and right...


here is the info fields...:

  1. typedef struct dataNode {
  2. char arriveCity[30];
  3. char departCity[30];
  4. int totalPassengers;
  5. int passengers;
  6. int flightNumber;
  7. struct dataNode * left;
  8. struct dataNode * right;
  9. };
  10.  
  11. dataNode * root;

im sure i need to do a comparision like...

  1. if (flightNumber < root -> flightNumber)
  2. flightNumber = left -> flightNumber;
  3. else if (flightNumber > root -> flightNumber)
  4. flightNumber = right -> flightNumber;

however i dont think that will cover everything and i dont know if it would balance the tree.... plus im not exactly sure where to put that into the insertion function...

and i just compare the flightnumbers but all the data in the struct needs to be... attatched to that one flight number.... i have to have it search for a flight then cout all the information that is linked with that flightnumber... or city or whatever the search field is...

am i on the right track? and where do i go from here?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,580
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 709
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: binary tree class

 
0
  #4
Aug 10th, 2005
>but im not sure how to do that
It would be easier to build the data part of a node in your client code and pass it to the binary tree class. That would involve something like this:
  1. struct data {
  2. char arriveCity[30];
  3. char departCity[30];
  4. int totalPassengers;
  5. int passengers;
  6. int flightNumber;
  7. };
  8.  
  9. struct node {
  10. data item;
  11. node *left, *right;
  12. };
Then the input function could be easily modified:
  1. bool binaryTree::insert(dataNode*& tree, data item) {
  2. if (tree == NULL) {
  3. tree = new node;
  4. tree -> left = NULL;
  5. tree -> right = NULL;
  6. tree -> item = item;
  7. return true;
  8. }
  9. else if (item -> flightNumber == tree -> item -> flightNumber)
  10. return false;
  11. else if (item -> flightNumber <= tree -> item -> flightNumber)
  12. return insert (tree -> left, item);
  13. else
  14. return insert (tree -> right, item);
  15. }
>i dont know if it would balance the tree
No, it won't. Balancing is much more complicated than that. I have several binary search tree tutorials on my website if you want to take a look at them.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

Re: binary tree class

 
0
  #5
Aug 10th, 2005
Thanks narue.. I already did some other things by the time i saw this post. But I have more problems with it. And my code looks alot different tahn before. I changed the majority of everything to get it to work.

and it does compile!!!!

  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. class binaryTree {
  7.  
  8. public:
  9.  
  10. binaryTree ();
  11. ~binaryTree ();
  12. void menu ();
  13.  
  14. private:
  15.  
  16. typedef struct dataNode {
  17. char arriveCity[30];
  18. char departCity[30];
  19. int totalPassengers;
  20. int passengers;
  21. int flightNumber;
  22. struct dataNode * left;
  23. struct dataNode * right;
  24. };
  25.  
  26. dataNode * root;
  27. void insert (dataNode *, dataNode &);
  28. void retrieveAll (dataNode *);
  29. void retrieveOpen (dataNode *);
  30. void retrieveCity (dataNode *);
  31.  
  32. };
  33.  
  34. binaryTree::binaryTree() {
  35.  
  36. dataNode * root = NULL;
  37. dataNode * left = NULL;
  38. dataNode * right = NULL;
  39.  
  40. }
  41.  
  42. binaryTree::~binaryTree() {
  43.  
  44. delete root;
  45.  
  46. }
  47.  
  48. void binaryTree::insert(dataNode* tree, dataNode &newNode) {
  49.  
  50. if (tree == NULL) {
  51.  
  52. tree = new dataNode;
  53. tree -> left = NULL;
  54. tree -> right = NULL;
  55.  
  56. cout << "Please input the six digit flight number (100000 - 999999): ";
  57. cin >> tree -> flightNumber;
  58.  
  59. if (tree -> flightNumber < 100000 || tree -> flightNumber > 999999) {
  60. cout << "Invalid flight number reference" << endl << endl;
  61. void insert(dataNode*& tree, dataNode &newNode);
  62. }
  63.  
  64. cout << endl << "What is the departure city? ";
  65. cin >> tree -> departCity[30];
  66. cout << endl << "What city is the flight destination? ";
  67. cin >> tree -> arriveCity[30];
  68. cout << endl << "What is the maximum capacity for this flight? ";
  69. cin >> tree -> totalPassengers;
  70. cout << endl << "How many passengers currently have tickets? ";
  71. cin >> tree -> passengers;
  72. cout << endl;
  73.  
  74. tree -> flightNumber = newNode.flightNumber;
  75. tree -> totalPassengers = newNode.totalPassengers;
  76. tree -> passengers = newNode.passengers;
  77. strcpy(tree -> arriveCity, newNode.arriveCity);
  78. strcpy(tree -> departCity, newNode.departCity);
  79.  
  80. }
  81. }
  82.  
  83. void binaryTree::retrieveAll (dataNode * tree) {
  84.  
  85. while (root != NULL){
  86. retrieveAll (tree -> left);
  87. cout << tree -> flightNumber << " " ;
  88. cout << tree -> departCity[30] << " ";
  89. cout << tree -> arriveCity[30] << " ";
  90. cout << tree -> passengers << " ";
  91. cout << tree -> totalPassengers << " " << endl;
  92. retrieveAll (tree -> right);
  93. }
  94. }
  95.  
  96. void binaryTree::retrieveOpen(dataNode * tree) {
  97.  
  98. while (root != NULL) {
  99. if (tree -> passengers < tree -> totalPassengers) {
  100. retrieveOpen (tree -> left);
  101. cout << tree -> flightNumber << " " ;
  102. cout << tree -> departCity[30] << " ";
  103. cout << tree -> arriveCity[30] << " ";
  104. cout << tree -> passengers << " ";
  105. cout << tree -> totalPassengers << " " << endl;
  106. retrieveOpen (tree -> right);
  107. }
  108. }
  109. }
  110.  
  111. void binaryTree::retrieveCity(dataNode * tree) {
  112.  
  113. char city[30];
  114. cout << "What city would you like to see departing flights from? ";
  115. cin >> city;
  116.  
  117.  
  118. while (root!= NULL) {
  119. if (tree -> departCity == city) {
  120. retrieveCity (tree -> left);
  121. cout << tree -> flightNumber << " " ;
  122. cout << tree -> departCity[30] << " ";
  123. cout << tree -> arriveCity[30] << " ";
  124. cout << tree -> passengers << " ";
  125. cout << tree -> totalPassengers << " " << endl;
  126. retrieveCity (tree -> right);
  127. }
  128. }
  129. }
  130.  
  131. void binaryTree::menu () {
  132.  
  133.  
  134. int choice = 0, searchChoice = 0;
  135.  
  136. while (choice != 3) {
  137.  
  138. cout << endl;
  139. cout << "Welcome to the JHD International Airport! How can we be of assistance?" << endl;
  140. cout << "Please select the best option for you:" << endl;
  141. cout << " 1. Create a new flight record." << endl;
  142. cout << " 2. Search for a flight." << endl;
  143. cout << " 3. End current program session." << endl;
  144. cin >> choice;
  145. cout << endl;
  146.  
  147. if (choice == 1)
  148. void insert(dataNode * tree, dataNode &newNode);
  149.  
  150. else if (choice == 2) {
  151.  
  152. cout << "Please select the search option of your choice:" << endl;
  153. cout << " 1. Display all flight records." << endl;
  154. cout << " 2. Display all departing flights from a city." << endl;
  155. cout << " 3. Display all open flights." << endl;
  156. cout << " 4. Go back to the main menu." << endl;
  157. cin >> searchChoice;
  158. cout << endl;
  159.  
  160. if (searchChoice == 1)
  161. void retrieveAll(dataNode & newNode);
  162. else if (searchChoice == 2)
  163. void retrieveCity(dataNode & newNode);
  164. else if (searchChoice == 3)
  165. void retrieveOpen(dataNode & newNode);
  166. else if (searchChoice == 4)
  167. void menu ();
  168. else {
  169. cout << endl << "That is invalid an option" << endl;
  170. void menu ();
  171. }
  172. }
  173.  
  174. else if (choice == 3)
  175. break;
  176.  
  177. else {
  178.  
  179. cout << "That is an invalid option" << endl;
  180. void menu();
  181. }
  182. }
  183. }
  184.  
  185. int main () {
  186.  
  187. binaryTree binTree;
  188. binTree.menu();
  189.  
  190. return 0;
  191.  
  192. }

tried to minimize the main function.

Anyways, it goes to the menu and lets you select an option... if type in an invalid choice that works.. and if you pick the option to quit that works, all the others seen to just keep looping around.

am i calling my functions wrong or are my functions just wrong period? i think my insert is lacking?

and as a quick side topic... we never had to write destructors before so i know itll be more than delete root... what else is needed there?
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,335
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 236
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: binary tree class

 
0
  #6
Aug 10th, 2005
For my benefit, could you fix this part:
  1. typedef struct dataNode {
  2. char arriveCity[30];
  3. char departCity[30];
  4. int totalPassengers;
  5. int passengers;
  6. int flightNumber;
  7. struct dataNode * left;
  8. struct dataNode * right;
  9. };
The name of the typedef is between the } and the ; - that empty part. I've tried to look at some things a number of times, but these little fixits here and there begin to discourage me.

Because, you see, for me it does not compile.
Error E2092 testpp.cpp 24: Storage class 'typedef' is not allowed here
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

Re: binary tree class

 
0
  #7
Aug 10th, 2005
i dont understand? just delete the word typedef?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 105
Reputation: jhdobbins is an unknown quantity at this point 
Solved Threads: 3
jhdobbins jhdobbins is offline Offline
Junior Poster

Re: binary tree class

 
0
  #8
Aug 11th, 2005
sorry dave, i still dont know what you were asking me to remove. so for everyone else out there... my program is seg faulting. and a debugger isnt helping so i am wondering you anyone can pick up on the problem that i am overlooking...

it allows you to input information but if you want to search - display information off menu option 2 then any of the search options - the program seg faults... i changed my while loop from (root != Null) to (tree != Null) and that didnt fix it... any other ideas? thank you.

  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. class binaryTree {
  7.  
  8. public:
  9.  
  10. binaryTree ();
  11. ~binaryTree ();
  12. void menu ();
  13.  
  14. private:
  15.  
  16. typedef struct dataNode {
  17. char arriveCity[30];
  18. char departCity[30];
  19. int totalPassengers;
  20. int passengers;
  21. int flightNumber;
  22. struct dataNode * left;
  23. struct dataNode * right;
  24. };
  25.  
  26. dataNode * root;
  27. void info (dataNode & newNode);
  28. void insert (dataNode *, dataNode &);
  29. void retrieveAll (dataNode *);
  30. void retrieveOpen (dataNode *);
  31. void retrieveCity (dataNode *);
  32.  
  33. };
  34.  
  35. binaryTree::binaryTree() {
  36.  
  37. dataNode * root = NULL;
  38. dataNode * left = NULL;
  39. dataNode * right = NULL;
  40.  
  41. }
  42.  
  43. binaryTree::~binaryTree() {
  44.  
  45. delete root;
  46.  
  47. }
  48.  
  49. void binaryTree::info(dataNode & newNode) {
  50.  
  51. cout << "Please input the six digit flight number (100000 - 999999): ";
  52. cin >> newNode.flightNumber;
  53.  
  54. if (newNode.flightNumber < 100000 || newNode.flightNumber > 999999)
  55. cout << "Invalid flight number reference" << endl << endl;
  56.  
  57. cin.ignore();
  58. cout << endl << "What is the departure city? ";
  59. cin.getline(newNode.departCity, 30);
  60. cout << endl << "What city is the flight destination? ";
  61. cin.getline(newNode.arriveCity, 30);
  62. cout << endl << "What is the maximum capacity for this flight? ";
  63. cin >> newNode.totalPassengers;
  64. cout << endl << "How many passengers currently have tickets? ";
  65. cin >> newNode.passengers;
  66. cout << endl;
  67. }
  68.  
  69. void binaryTree::insert(dataNode* tree, dataNode &newNode) {
  70.  
  71. if (tree == NULL) {
  72.  
  73. tree = new dataNode;
  74. tree -> left = NULL;
  75. tree -> right = NULL;
  76. tree -> flightNumber = newNode.flightNumber;
  77. tree -> totalPassengers = newNode.totalPassengers;
  78. tree -> passengers = newNode.passengers;
  79. strcpy(tree -> arriveCity, newNode.arriveCity);
  80. strcpy(tree -> departCity, newNode.departCity);
  81.  
  82. }
  83. }
  84.  
  85. void binaryTree::retrieveAll (dataNode * tree) {
  86.  
  87. while (root != NULL){
  88. retrieveAll (tree -> left);
  89. cout << tree -> flightNumber << " " ;
  90. cout << tree -> departCity[30] << " ";
  91. cout << tree -> arriveCity[30] << " ";
  92. cout << tree -> passengers << " ";
  93. cout << tree -> totalPassengers << " " << endl;
  94. retrieveAll (tree -> right);
  95. }
  96. }
  97.  
  98. void binaryTree::retrieveOpen(dataNode * tree) {
  99.  
  100. while (root != NULL) {
  101. if (tree -> passengers < tree -> totalPassengers) {
  102. retrieveOpen (tree -> left);
  103. cout << tree -> flightNumber << " " ;
  104. cout << tree -> departCity[30] << " ";
  105. cout << tree -> arriveCity[30] << " ";
  106. cout << tree -> passengers << " ";
  107. cout << tree -> totalPassengers << " " << endl;
  108. retrieveOpen (tree -> right);
  109. }
  110. }
  111. }
  112.  
  113. void binaryTree::retrieveCity(dataNode * tree) {
  114.  
  115. char city[30];
  116. cout << "What city would you like to see departing flights from? ";
  117. cin.getline(city, 30);
  118.  
  119. while (root!= NULL) {
  120. if (tree -> departCity == city) {
  121. retrieveCity (tree -> left);
  122. cout << tree -> flightNumber << " " ;
  123. cout << tree -> departCity[30] << " ";
  124. cout << tree -> arriveCity[30] << " ";
  125. cout << tree -> passengers << " ";
  126. cout << tree -> totalPassengers << " " << endl;
  127. retrieveCity (tree -> right);
  128. }
  129. }
  130. }
  131.  
  132. void binaryTree::menu () {
  133.  
  134. int choice = 0, searchChoice = 0;
  135.  
  136. while (choice != 3) {
  137.  
  138. cout << endl;
  139. cout << "Welcome to the JHD International Airport! How can we be of assistance?" << endl;
  140. cout << "Please select the best option for you:" << endl;
  141. cout << " 1. Create a new flight record." << endl;
  142. cout << " 2. Search for a flight." << endl;
  143. cout << " 3. End current program session." << endl;
  144. cin >> choice;
  145. cout << endl;
  146.  
  147. if (choice == 1) {
  148. dataNode newNode;
  149. info(newNode);
  150. insert(root, newNode);
  151. }
  152. else if (choice == 2) {
  153.  
  154. cout << "Please select the search option of your choice:" << endl;
  155. cout << " 1. Display all flight records." << endl;
  156. cout << " 2. Display all departing flights from a city." << endl;
  157. cout << " 3. Display all open flights." << endl;
  158. cout << " 4. Go back to the main menu." << endl;
  159. cin >> searchChoice;
  160. cout << endl;
  161.  
  162. if (searchChoice == 1) {
  163. dataNode *tree;
  164. retrieveAll(tree);
  165. }
  166. else if (searchChoice == 2) {
  167. dataNode *tree;
  168. retrieveCity(tree);
  169. }
  170. else if (searchChoice == 3) {
  171. dataNode *tree;
  172. retrieveOpen(tree);
  173. }
  174. }
  175.  
  176. else if (choice == 3)
  177. break;
  178.  
  179. else {
  180.  
  181. cout << "That is an invalid option" << endl;
  182. void menu();
  183. }
  184. }
  185. }
  186.  
  187. int main () {
  188.  
  189. binaryTree binTree;
  190. binTree.menu();
  191.  
  192. return 0;
  193. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC