PLEASE ANSWER A, B AND C COMP CSI C++ s the class dectaration for the Bag class
ID: 3755046 • Letter: P
Question
PLEASE ANSWER A, B AND C
COMP CSI C++
Explanation / Answer
please give thumbs up, thanks
a.
Bag <char> myBag=Bag();
b.
myBag.add[ary[0]];
myBag.add[ary[1]];
myBag.add[ary[2]];
c.
char letter;
cout<<"Please enter a character to llo for in myBag";
cin>>letter;
if(myBag.contains(letter))
{
bool flag =myBag.remove(letter);
if(flag==true)
cout<<letter<<" is removed from myBag";
else
cout<<letter<<" is can't removed from myBag";
}
else
{
cout<<letter<<" doesnot exist in myBag";
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.