Instructions

For this project you will be designing and implementing a system in C++, that will take one or more sets of personal possessions belonging to you and your soon to be roommates, and perform inventory management for the move in. The sets must be implemented via a Linked List representation and your system will need to provide set operation functionality. The user will submit a total list of all desired possessions, followed by lists of each person's possessions via an input file. Your system must output the total set of all possessions that will be in the new apartment, for each person the set of possessions they brought, the total set of all desired possessions, the set of all desired possessions brought by at least one person, the set of all desired possessions brought by exactly one person, the set of all desired possessions brought by more than one person, and the set of all desired possessions that are unfortunately missing.

Requirements

This assignment has two parts: a design portion and an implementation portion.

Design Document

For the design portion, you must generate documentation, in PDF format, describing your system. The purpose of this is for you to explain not just what your system is doing, and how it is doing it, but why. You will need to justify your design decisions in a concise, informative manner. Justifications such as "I did this because it was easy" are not sufficient, as you should actually explain why a particular data structure or algorithm was more efficient, effective, or optimal. Additionally, commented code, while sometimes helpful in small examples, is not a sufficient explanation in and of itself. Your explanations and justifications are expected to be presented in prose and in paragraph format, i.e. not bulleted lists. Further, part of the evaluation of your design document is the apparent amount of thought and effort that went into its creation.

This document should be divided into three main parts, and should follow the provided template.

In the first part, in one or two paragraphs you should describe the project in your own words and give a brief overview of the problem. Do not copy and paste this from the instruction document.

For the second part, you should describe the data structures you used in your system. What, if any, objects or structs did you create to store data? How did you organize and manage them? What types of formal data structures did you make use of (trees, graphs, arrays, hashes, etc)? In a few paragraphs, describe in detail how you stored the various data elements in your system, and be sure to provide sufficient justification of your methodology.

For the third part, you should describe functionality of your system. How is data moved and transformed? How is it read in? How is it output? What are the various major functions you constructed and how do they work? In a few paragraphs, describe in detail how your system works, and be sure to provide sufficient justification of your methodology. You might also consider including diagrams to more easily visualize how all of the pieces fit together.

Implementation

Your program must provide the following functionality and adhere to the following constraints:

  • Allow the user to input the file describing the move
    • Do NOT hardcode the filename into your program
    • The first line is a comma-delimited list of all possessions that are desired to have for the apartment
    • All other lines start with the name of the person, followed by a colon, and then a comma-delimited list of possessions owned by that person
    • Note there may be some desired items that are not brought by any person, and some items that are brought that are not desired
  • The set class representing a single person's set of possessions should be in its own .cpp with an associated header file and contain at least:
    • A Linked List representation of the person's possessions, where a node in the list represents a single possession. You must construct your own Linked List and cannot use the list container.
    • Appropriate accessor and mutator (getter and setter) member functions to promote encapsulation.
  • Your int main() should be in its own .cpp file
  • All .cpp files, except your main.cpp, must have associated header files. You may not #include a .cpp file, only header files
  • All necessary set operations (i.e. Union, Intersection, etc) should be implemented as functions in a separate .cpp file with an associated header file
    • Set operations can only be performed on a max of two sets a time, i.e. a single operation should take in at most two sets at a time
  • Your system should first:
    • Read in and store each person's list of possessions
    • Output the total set of all possessions that will be in the new apartment
    • For each person, output their name and their set of possessions
    • See the example output files for formatting
  • Using the defined set operations, your program should then calculate and output the following in an easy to read format:
    • The total set of all desired possessions (This is given in the file and does not need to be calculated)
    • The set of all desired possessions brought by one or more people.
    • The set of all desired possessions brought by exactly one person.
    • The set of all desired possessions brought by more than one person.
    • The set of all desired possessions that were not brought at all.
    • See the example output files for formatting
    • Remember that most set operations are binary (performed on two sets), so your set operation functions should never be performed on more than two sets at a time. You may need a temporary set to store information while you are working toward the final solution.
    • Manipulation and generation of resulting sets should only be performed using set operations, and you cannot use counting to determine how many times a possession has been brought
    • Resulting sets, such as the set of all desired possessions brought by one or more people, must be generated via set operations.
  • You may not use any of the set containers or set operations/algorithms provided by C or C++.
    • Examples: bitsets, sets, multisets, set_union, set_intersection, set_difference
  • Your code must be well commented.
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.