Home » Bag-based dictionary | Computer Science homework help

Bag-based dictionary | Computer Science homework help

Version:1.0 StartHTML:0000000214 EndHTML:0000065236 StartFragment:0000052727 EndFragment:0000065196 SourceURL:file:///C:/Users/orang/AppData/Local/Temp/Temp1_bagADTfiles.zip/Programming%20Assignment%201.docx                <!–  /* Font Definitions */  @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:”Cambria Math”; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-536859905 -1073732485 9 0 511 0;} @font-face {font-family:Cambria; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-536870145 1073743103 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:””; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} p.MsoTitle, li.MsoTitle, div.MsoTitle {mso-style-priority:10; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:”Title Char”; mso-style-next:Normal; margin-top:0in; margin-right:0in; margin-bottom:15.0pt; margin-left:0in; mso-add-space:auto; mso-pagination:widow-orphan; border:none; mso-border-bottom-alt:solid #4F81BD 1.0pt; mso-border-bottom-themecolor:accent1; padding:0in; mso-padding-alt:0in 0in 4.0pt 0in; font-size:26.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#17365D; mso-themecolor:text2; mso-themeshade:191; letter-spacing:.25pt; mso-font-kerning:14.0pt;} p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst {mso-style-priority:10; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:”Title Char”; mso-style-next:Normal; mso-style-type:export-only; margin:0in; margin-bottom:.0001pt; mso-add-space:auto; mso-pagination:widow-orphan; border:none; mso-border-bottom-alt:solid #4F81BD 1.0pt; mso-border-bottom-themecolor:accent1; padding:0in; mso-padding-alt:0in 0in 4.0pt 0in; font-size:26.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#17365D; mso-themecolor:text2; mso-themeshade:191; letter-spacing:.25pt; mso-font-kerning:14.0pt;} p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle {mso-style-priority:10; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:”Title Char”; mso-style-next:Normal; mso-style-type:export-only; margin:0in; margin-bottom:.0001pt; mso-add-space:auto; mso-pagination:widow-orphan; border:none; mso-border-bottom-alt:solid #4F81BD 1.0pt; mso-border-bottom-themecolor:accent1; padding:0in; mso-padding-alt:0in 0in 4.0pt 0in; font-size:26.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#17365D; mso-themecolor:text2; mso-themeshade:191; letter-spacing:.25pt; mso-font-kerning:14.0pt;} p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast {mso-style-priority:10; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:”Title Char”; mso-style-next:Normal; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:15.0pt; margin-left:0in; mso-add-space:auto; mso-pagination:widow-orphan; border:none; mso-border-bottom-alt:solid #4F81BD 1.0pt; mso-border-bottom-themecolor:accent1; padding:0in; mso-padding-alt:0in 0in 4.0pt 0in; font-size:26.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#17365D; mso-themecolor:text2; mso-themeshade:191; letter-spacing:.25pt; mso-font-kerning:14.0pt;} p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle {mso-style-priority:11; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:”Subtitle Char”; mso-style-next:Normal; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:12.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#4F81BD; mso-themecolor:accent1; letter-spacing:.75pt; font-style:italic;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:.5in; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} span.TitleChar {mso-style-name:”Title Char”; mso-style-priority:10; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:Title; mso-ansi-font-size:26.0pt; mso-bidi-font-size:26.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#17365D; mso-themecolor:text2; mso-themeshade:191; letter-spacing:.25pt; mso-font-kerning:14.0pt;} span.SubtitleChar {mso-style-name:”Subtitle Char”; mso-style-priority:11; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:Subtitle; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:”Cambria”,serif; mso-ascii-font-family:Cambria; mso-ascii-theme-font:major-latin; mso-fareast-font-family:”Times New Roman”; mso-fareast-theme-font:major-fareast; mso-hansi-font-family:Cambria; mso-hansi-theme-font:major-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:major-bidi; color:#4F81BD; mso-themecolor:accent1; letter-spacing:.75pt; font-style:italic;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:”Calibri”,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.WordSection1 {page:WordSection1;}  /* List Definitions */  @list l0 {mso-list-id:547842656; mso-list-type:hybrid; mso-list-template-ids:1948048376 598388828 1666898648 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:-; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Calibri”,sans-serif; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} @list l0:level2 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:ï‚·; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} @list l0:level3 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} @list l0:level4 {mso-level-number-format:bullet; mso-level-text:ï‚·; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l0:level5 {mso-level-number-format:bullet; mso-level-text:o; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Courier New”;} @list l0:level6 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} @list l0:level7 {mso-level-number-format:bullet; mso-level-text:ï‚·; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l0:level8 {mso-level-number-format:bullet; mso-level-text:o; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Courier New”;} @list l0:level9 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} @list l1 {mso-list-id:1087535644; mso-list-type:hybrid; mso-list-template-ids:-1243319738 598388828 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:-; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Calibri”,sans-serif; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} @list l1:level2 {mso-level-number-format:bullet; mso-level-text:o; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Courier New”;} @list l1:level3 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} @list l1:level4 {mso-level-number-format:bullet; mso-level-text:ï‚·; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l1:level5 {mso-level-number-format:bullet; mso-level-text:o; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Courier New”;} @list l1:level6 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} @list l1:level7 {mso-level-number-format:bullet; mso-level-text:ï‚·; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l1:level8 {mso-level-number-format:bullet; mso-level-text:o; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:”Courier New”;} @list l1:level9 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in; font-family:Wingdings;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} –>     

Programming Assignment 1 –
Bag-based Dictionary

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

Use the bag ADT provided to create an ( the C++ vector library) implementation for bags.  Then use your bag to implement the dictionary ADT provided you.

Test your bag and dictionary implementations with the following template combinations:

– <int, string> — all functions

– <string, int> — insert and find functions only

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

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

– ABag.h                                // Your bag-array implementation

– BDictionary.h                    // Your Dictionary-bag implementation

– dictionaryTest.cpp           // Your test program

– screen_shots.doc/txt      // Word document with screen shot(s) showing
                                             // program in action or a text file showing the test
                                             // program’s output. 

– Approach.doc                    // This is a Word document where you explain how you implemented
                                             // your solution and how you tested each required function.

– Your_dictionary.exe        //Your executable file.***

*** If you completed your assignment using Visual Studios you must use Visual Studios 2010 or 2013 and I recommend you run your executable on another computer to insure it will run as a stand-alone executable.  Depending on how you initialized your project it may not run in the stand-alone mode.  If that is the case, you will have to zip up your entire project directory and submit that to me.  See me if you have any questions.

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.   See me if you have questions.

Your assignment is due Wednesday of Week 4.  Late assignments will not be accepted.

  

                    Rubrics:

Program must run in order to get any points.  By “run” I mean that at 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, int>, <string, string>, etc.).  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).

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more