You are here:

C++/Assignment help


Any help in this program will be helpful...
design and implement in C++, a class based program, with three (3) sub-menus, to implement the operations of a Set, Priority Queue and Binary Search Tree abstract data types. Your program should prompt the user to provide two (2) text files, which will be aliased as File1 and File2 respectively.  

For the SETS operation, you need to define two (2) containers (objects), SetA and SetB and menu options for the following tasks:
  Read the individual words from File1 into SetA.
  Read the individual words from File2 into SetB.
  Display contents of SetA.
  Display contents of SetB.
  Display Intersection of SetA and SetB.
  Display Union of SetA and SetB.
  Display the Difference between SetA and SetB (i.e Complement of SetA).
  Delete a word from SetA.
  Delete a word from SetB.

For the PRIORITY QUEUE operation, the following menu options are required:
  Read the individual words from File1 and store them in the priority queue.
  Display the contents of the priority queue.
  Add a word to the queue.
  Delete a word from the queue.

For the BINARY SEARCH TREE operation the following menu options are required:
  Read the individual words from File1 and store them in the BST
  Read the individual words from File2 and store them in the BST
  Display the content of the BST using PREORDER.
  Display the content of the BST using INORDER.
  Display the content of the BST using POSTORDER.
  Add a word to the tree.
  Remove a word from the tree.

Noting that uppercase and lowercase versions of characters are not the same, you are required therefore, to reduce ALL words to lowercase, before inserting them into the containers.

gaby , Thank you for your question.

It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers.

Please attempt to do part of the work, and then ask a specific question when you get stuck.

Learning can be difficult, but doing your own work will repay your effort with good grades in school and success in your career.

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2017 All rights reserved.

[an error occurred while processing this directive]