Design a class (or classes) to represent text, i.e. a sequence of characters. Support search and replace for subsequences.
1 proposed deign: