Overview Implement a dictionary using a Bag—Project 4.7 in the text (modified) Instructions Use the bag ADT provided to create an array-based implementation for bags.  Then use your bag to implement the dictionary ADT provided you.  This means you have to implement your dictionary using the bag functions. Test your bag and dictionary implementations with the bagtestmain.cpp file provided for you.  If you are not able to fully implement all the functions of the dictionary and/or bag, you may modify the tests in bagtestmain.cpp to only exercise those functions you were able to complete. You will only get credit for those methods you test and display, so be sure you don’t leave any out.  Also, do not add any public functions to your bag and dictionary implementations beyond those specified in the ADTs, though you may add private functions if you want. Put the following files into a zip file named student_name_Bag_Assignment and submit them to Canvas: h // Your bag-array implementation which must inherit the Bag class h // Your Dictionary-bag implementation which must inherit the                                            // Dictionary class cpp // The test driver I have provided for you h // The bag ADT I gave you – it should be unchanged h // The dictionaryADT I gave you – it should be unchanged h // The kvpair class I gave you – it should be unchanged Screen Shots             // Word document with screen shot(s) and integrity statements showing                  // all of your program’s output. doc             // This is a Word document where you explain how you implemented                     // your solution and how you tested each required function. Any other .cpp and/or .h files that comprise your project (I need all the .cpp and .h files used in your project). exe //Your executable file.*** *** If you completed your assignment using Visual Studios you must use Visual Studios 2017 and submit your entire VS project directory. Note: If your ABag does not inherit Bag and/or BDictionary does not inherit Dictionary, you will not receive any credit for your work. If you use the templates provided (ABag.h and BDictionary.h) the inheritance is already done for you. Your test program must exercise every function of the dictionary.  For any function whose functionality is not obvious you must explain in your Word document how your test output demonstrates that function. Reach out to your professor if you have questions. Rubrics (For the 70% Content Portion) Program must run in order to get any points.  By “run” this means that you must at least get one or more of the bag methods working (and your program must demonstrate that functionality). Tips for Success Start by working on your “Approach” first. Once you are satisfied with your approach, then start building your program incrementally.  Start with the bag and increment one feature at a time (you’ll have to stub out the features the ADT requires that you are not ready to implement yet) starting with the constructors and then working your way down the feature list using common sense to figure out which features need to be implemented first.  Try your bag out with the various parameter combinations I want you to test with ( and ).  When you are satisfied the bag is working then move on to the dictionary, again implementing and testing function by function. Don’t wait until the last minute. You’ll find that many of your problems you will solve while you are away from your computer and have a chance to think about the error you are seeing.  This takes time.  Note:  KVpair, which uses the == operator for comparing the key values, will only accept objects that have also implemented the == operator.  This class has been tested with the following types: string int

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Overview

Implement a dictionary using a Bag—Project 4.7 in the text (modified)

Instructions

Use the bag ADT provided to create an array-based implementation for bags.  Then use your bag to implement the dictionary ADT provided you.  This means you have to implement your dictionary using the bag functions.

Test your bag and dictionary implementations with the bagtestmain.cpp file provided for you.  If you are not able to fully implement all the functions of the dictionary and/or bag, you may modify the tests in bagtestmain.cpp to only exercise those functions you were able to complete.

You will only get credit for those methods you test and display, so be sure you don’t leave any out. 

Also, do not add any public functions to your bag and dictionary implementations beyond those specified in the ADTs, though you may add private functions if you want.

Put the following files into a zip file named student_name_Bag_Assignment and submit them to Canvas:

  • h // Your bag-array implementation which must inherit the Bag class
  • h // Your Dictionary-bag implementation which must inherit the                                            // Dictionary class
  • cpp // The test driver I have provided for you
  • h // The bag ADT I gave you – it should be unchanged
  • h // The dictionaryADT I gave you – it should be unchanged
  • h // The kvpair class I gave you – it should be unchanged
  • Screen Shots             // Word document with screen shot(s) and integrity statements showing                  // all of your program’s output.
    doc             // This is a Word document where you explain how you implemented                     // your solution and how you tested each required function.
  • Any other .cpp and/or .h files that comprise your project (I need all the .cpp and .h files used in your project).
  • exe //Your executable file.***

*** If you completed your assignment using Visual Studios you must use Visual Studios 2017 and submit your entire VS project directory.

Note: If your ABag does not inherit Bag and/or BDictionary does not inherit Dictionary, you will not receive any credit for your work. If you use the templates provided (ABag.h and BDictionary.h) the inheritance is already done for you.

Your test program must exercise every function of the dictionary.  For any function whose functionality is not obvious you must explain in your Word document how your test output demonstrates that function. Reach out to your professor if you have questions.

Rubrics (For the 70% Content Portion)

Program must run in order to get any points.  By “run” this means that you must at least get one or more of the bag methods working (and your program must demonstrate that functionality).

Tips for Success

  • Start by working on your “Approach” first. Once you are satisfied with your approach, then start building your program incrementally.  Start with the bag and increment one feature at a time (you’ll have to stub out the features the ADT requires that you are not ready to implement yet) starting with the constructors and then working your way down the feature list using common sense to figure out which features need to be implemented first.  Try your bag out with the various parameter combinations I want you to test with (<int, string> and <string, int>).  When you are satisfied the bag is working then move on to the dictionary, again implementing and testing function by function.
  • Don’t wait until the last minute. You’ll find that many of your problems you will solve while you are away from your computer and have a chance to think about the error you are seeing.  This takes time. 

Note:  KVpair, which uses the == operator for comparing the key values, will only accept objects that have also implemented the == operator.  This class has been tested with the following types:

  • string
  • int

It specifically does not work with the Int type (at least not in the version of C++ I am working with).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY