Implement Public Methods Described Case Given Method Header Specifies Method S Name Retur Q43895010
You should implement each ofthe public methods described below. In each case you are given themethod header which specifies the method’s name, return type andparameter list. A brief description follows each method, includingany exceptions that should be thrown by the method. You mayimplement other private methods as you deem necessary.
Main Function
You should write a main function in a separate file from yourStringSet class; you should use your main function (and other testfunctions) to test your class methods. You should not submit thefile containing the main function. I would strongly suggestcompiling and running your program after you complete each method(or couple of methods), do not try to complete the entire classbefore testing it as this will almost certainly end up beingconsiderably more work.
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 String Set Returning the intersection of the calling object and another String Set . 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 (#include <string>). The string class is part of the standard namespace (std). Class Files Your class should consist of a header file called StringSet.h that contains the class definition and an implementation file called StringSet.cpp that contains the method definitions Show transcribed image text 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 String Set Returning the intersection of the calling object and another String Set . 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 (#include ). The string class is part of the standard namespace (std). Class Files Your class should consist of a header file called StringSet.h that contains the class definition and an implementation file called StringSet.cpp that contains the method definitions
Expert Answer
Answer to You should implement each of the public methods described below. In each case you are given the method header which spec…
OR