Question: In the file strFuncs.cpp, write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are

In the file strFuncs.cpp, write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are anagrams, otherwise it returns false. The function should not be case sensitive and should disregard any punctuation or spaces. Two strings are anagrams if the letters can be rearranged to form each other. For example, Eleven plus two is an anagram of Twelve plus one. Each string contains one v, three es, two ls, etc. Similarly Rats and Mice and in cats dream are anagrams of each other. You may use any of the C string library or string class functions to complete this code. You may not use built-in C++ functions that we have NOT discussed in lecture. You must follow a TDD style of coding. Write your own test code in a separate file and write a Makefile to compile the code.

In the file strFuncs.cpp, write a function called isAnagram that takes two

#include #include #include #include algorithm> #include "strFuncs.h" using namespace std; Precondition: Two valid strings s1 and s2, each containing a mix of alphabets, spaces and punctuations * Post condition: Return true if one string is an anagram of the other string. White spaces, punctuations and the case for the letters (upper or lower) should not * affect your result it bool isAnagram(string s1, string s2)0 return true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!