Revise the definition of the method getIndexOfso that it does not use aboolean variable.

What will be an ideal response?

```
template
intArrayBag::getIndexOf(const ItemType& target) const
{
intresult = -1;
intsearchIndex = 0;
// If the bag is empty, itemCount is zero, so loop is skipped
while((result == -1)&& (searchIndex < itemCount))
{
if (items[searchIndex] == target)
{
result = searchIndex;
}
else
{
searchIndex++;
} // end if
} // end while
return result;
} // end getIndexOf

```

Computer Science & Information Technology

You might also like to view...

By creating a Microsoft account, you can sign in to Office 2016 and have full access to OneDrive

Indicate whether the statement is true or false

Computer Science & Information Technology

With _________ encryption the encryption process is carried out at the two end systems.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology