Programming assignment 1 – bag-based dictionary | CSIS 215 - Algorithms and Data Structures | Liberty University - Lynchburg, VA

Programming Assignment 1 – Bag-based Dictionary mde2854 Implement a dictionary using a Bag—Project 4.7 in the text (modified) 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 I’ve 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, you cannot 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 Blackboard:

  • ABag.h // Your bag-array implementation which must inherit the Bag class
  • BDictionary.h // Your Dictionary-bag implementation which must inherit the // Dictionary class
  • bagtestmain.cpp // The test driver I have provided for you
  • bagADT.h // The bag ADT I gave you – it should be unchanged
  • dictionaryADT.h // The dictionaryADT I gave you – it should be unchanged
  • kvpair.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. Approach.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).
  • Your_dictionary.exe //Your executable file.***

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 I’ve provided (ABag.h and BDictionary.h) the inheritance is already done for you. *** If you completed your assignment using Visual Studios you must use Visual Studios 2017 and I would like you to submit your entire VS project directory. 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. See Blackboard for the assignment due date and the syllabus for the late policy.

Rubrics (for the 70% content portion):

  • Program must run in order to get any points. By “run” I mean 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). Debugging your code A big part of this assignment is debugging your code, so do not expect your instructor to do this for you. Having completed the pre-requisite courses for this class, you should already have some experience finding coding errors and fixing them. This class will give you plenty of opportunities to further refine those skills and you can only do that by wrestling with the problem. Here are some debugging tips: · Build a little, test a little. Don’t write all your code before you start debugging it. Break your work into logical chunks that can be compiled and debugged and build them one at a time. For this project, I would start by building the Bag class and implementing the addItem() function first. Once I get that function working properly, then I would move on to another Bag function. The idea is you build and test a function one function at a time. That way, if you run into an error, you know where to look. · Learn to use the debugger if you haven’t already. The debugger allows you to step through your code one step and a time and see what happens in memory while you’re doing it. When students come to me with problems, I first try to isolate where the problem is logically based on what the program is doing and then I use the debugger to find the actual fault. Here is an excellent video tutorial on the Visual Studios debugger: How to DEBUG C++ in VISUAL STUDIO. · Be willing to walk away from your computer and give your mind a rest. I find that the solution to a problem often comes to me while I am doing something else. I have never regretted stepping away from my computer to let the problem “percolate” in my mind, but I have often regretted not doing this. This is one of the reasons you should never wait till the last minute to start working on your program; by doing that you are not giving yourself the time to walk away.

  • 5 years ago
  • 50
  • BDictionary.h
  • bagADT.h
  • payment link (Anthropology online quiz )
  • its due 2/15/15 before 12am monday
  • Sustainable Development and the Environment
  • wkabli
  • Unconscious Bias "To Professor Ryan" Only
  • A recent national survey found that high school students watched
  • For Prof. Nicholas Only
  • What is the link between physical health and social factors? How is this explained by the biopsychosocial model?
  • Health care management
  • OMM 622 Week 2 Assignment ( Balance Sheet - Ford Motor Company ) ~ ( Latest Syllabus - Perfect Tutorial - Scored 100% )
4,322views
4.5
(211 ratings)

Related Study Guides

Assignment 2 Social Engineering Awareness Program for a Large Corporation | CSIS 343 - Cybersecurity

2. Propose customized social engineering awareness training modules for different departments within the corporation. Discuss tailored content for IT staff, executives, and general employees, consider...

sociologycomputer-science

4 questions | Applied Sciences homework help

6. The patient has a basic right to have available adequate health care. Physicians, along with the rest of society, should continue to work toward this goal. Fulfillment of this right is dependent on...

art-designnursing

Assignment 9 Cloud-Native Application Security for a Software Development Firm. | CSIS 343 - Cybersecurity

1. Develop a cloud-native application security framework for the software development firm. Discuss key considerations, such as secure coding practices, container security, and serverless architecture...

human-resourcescomputer-science

Discussion board | Applied Sciences homework help

7. Effectively bring a meeting to a close and follow up appropriately. eetings are a fact of life on the job. Between 11 million and 20 million business meetings take place each day in the United Stat...

communicationart-design

Final paper | Computer Science homework help

1. Literature Review and Analysis A. Importance of Structured Planning Kesa, (2023) underscore the importance of structured disaster recovery and planning and continuity of operations especially in hi...

art-designcomputer-science

Human resource management | Human Resource Management homework help

5. Are there pay disparities between males and females in the following jobs? · Forklift operators · Craters · Production Techs · Machine Operators Given your answers to ALL the previous questions, ex...

art-designhuman-resources

Three social work notes needed. in dap, soap, and pie. | Social Science homework help

Three social work notes needed. In DAP, SOAP, and PIE. ogesimzs19i5Three Notes Read the below scenario and imagine you are having THREE sessions with the client below. Write the case notes for each se...

sociologyhuman-resources

Assignment 10 Blockchain Security Audit for a Supply Chain Company.docx | CSIS 343 - Cybersecurity

1. Provide an overview of blockchain security fundamentals. Discuss the immutability of the blockchain, consensus mechanisms, and cryptographic principles that contribute to the security of distribute...

art-designeducation

Need Help With A Similar Question?

Our experts deliver perfect solutions with guaranteed A+ grades

A+
Student Grade
98%
Success Rate
12h
Delivery Time
Join 1,000+ students who got their perfect solutions
Rated 4.9/5 by satisfied students

Need Help With This Question?

Academic Expert

Subject Matter Specialist

98%
Success Rate
24/7
Support

Why Students Trust Us

  • PhD-Level Expertise
  • Original Work Guarantee
  • Better Grade or Free

"Got an A+ on my assignment. Exactly what I needed!"

Recent Student