Objectives

  • To strengthen student's knowledge of C++ programming
  • To give student experience reading and parsing strings of commands
  • To give student experience in writing Data Structures for data types

Instructions

For this assignment you must write a program that implements a membership directory for the BINGO Enthusiasts Association of Mississippi (BEAM). The membership directory should be implemented as a Binary Search Tree. The directory should be able to create/delete member accounts, edit a member's information, search for a specific member, display a list of members, and output list of members and their information to a file in post-order (the file format is described below).

Every entry in the membership directory should have the following properties: a member account name (one word), the member's first, last, and middle names, the number of games won, and the number of games lost. Use the account name to sort the BST.

Your program should implement a text-based interface capable of handling the following commands:

  • exit - exits the program
  • load < file > - parses the contents of the file as if they were entered from the command line
  • save < file > - saves the contents of the membership directory into the specified file using the format described below; output the information in post-order
  • directory - displays a list of member account names; use an inorder traversal
  • display < member >- displays the information for the given member
  • clear - clears the membership directory; this sets the BST to empty.
  • add < member > - adds a new member to the directory; create the member with default information and the specified account name
  • set < member > name < last > < first > < middle > - set the member's name to last, first middle. Last and first name is required, the middle name is optional.
  • set < member > wins < wins > - set member's wins to wins.
  • set < member > losses < losses > - set member's losses to losses.
  • remove < member > - remove the specified member.

The save file should have the following format:

# of Entries
Member Account Name 1
Last, First Middle
Wins Losses
Member Account Name 2
Last, First Middle
Wins Losses
Member Account Name 3
Last, First Middle
Wins Losses
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.