I need guidance on this, more so what direction do I take to append to a string and make sure it is returning the string value?
To append the character "D" and "A" into string you can use append(); function of string class. As you have already declared a string object as p in your code so, all you need to do is use p.append("D") in your if condition as shown below:
Sorry about that. What wasn’t helpful?