Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ only, Please have a StringSet.h and .cpp file. I also need a test.cpp file. Please also share screenshots of your code. Are you done
C++ only, Please have a StringSet.h and .cpp file. I also need a test.cpp file. Please also share screenshots of your code.
Are you done now?
CMPT 225 Assignment 1 - String Set You are to implement a class that stores a set of strings. The class should use a dynamic array as its underlying representation. This assignment is worth 5% of your grade. Please read the requirements carefully, paying particular attention to the names and input and output requirements of the class and its methods. We will be testing your class in our test program, so if you do not follow the requirements the program may not compile. Assignment submissions that do not compile will not be marked. We will be compiling and running our test program and your class in Linux using the g++ compiler with the -std=c++11 option. If you complete your assignment in some other environment (such as Visual Studio) I would strongly suggest checking that it compiles in g++ before submitting it. String Set Class Class Description Your class should be named StringSet and should support these operations: Creating an empty set Inserting a string Removing a string Finding a string Returning the size of a set Returning the union of the calling object and another StringSet Returning the intersection of the calling object and another StringSet Returning the set difference of the calling object and another StringSet Class Attributes Your class should be implemented using a dynamic array and should have at least the following private member variables A pointer to a string that will point to an array of strings created in dynamic memory An int that records the current size of the array (i.e. the number of strings stored in the array) An int that records the maximum size of the array String Support Your header file should include the string class (#includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started