Answer:
Replace /*Your code goes here */ with
string FilterStr(string str){
string retStr= "BAD";
if(isupper(str.at(4)) != 0){
retStr = "GOOD";
}
return retStr;
}
Explanation:
This defines the function
string FilterStr(string str){
This initializes the return string to BAD
string retStr= "BAD";
This checks if the string at index 4 is uppercase;
if(isupper(str.at(4)) != 0){
If yes the return string is updated to GOOD
retStr = "GOOD";
}
This returns the return string
return retStr;
}
<em>See attachment for complete program</em>