This assignment will require you to create a class called


Programming Principles

C++

This assignment will require you to create a class called stringList. This class will allow you to store up to 20 strings in a list, which will be kept as an array inside the class. The class will also have a number of functions as follows:

  1. void add(string added) - A function that will take in a string and that will add it into the array of the stringList class.
  2. bool remove (string removed) - A function that will remove the string defined by the parameter. It will return true if it finds the string and removes it, otherwise it will return false.
  3. bool compareString(string find) - A function that takes in a string and returns true if the string is found in the array of the stringList.
  4. bool replace(string x, string y) - A function that takes two strings, finds if string x exists in the array, and if it does, replaces it with string y, and returns true. Otherwise, it returns false.
  5. bool anagram() - A function that compares all strings in the array of the stringList class, and if it finds any string that is an anagram of another, it returns true. Otherwise it returns false.

The class should be submitted inside an appropriate .h and .cpp file. A driver program should also be included that shows the operation of the stringList class.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: This assignment will require you to create a class called
Reference No:- TGS02281751

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)