Define the method getPositionfor the class SortedListHasA.

What will be an ideal response?


```
template
int SortedListHasA::getPosition(const ItemType& anEntry) const
{
int position = 1;
int length = listPtr->getLength();
while ( (position <= length) &&
(anEntry> listPtr->getEntry(position)) )
position++;
if ( (position > length) || (anEntry != listPtr->getEntry(position)) )
position = -position;
return position;
} // end getPosition

```

Computer Science & Information Technology

You might also like to view...

Name two ways to switch between angles in the Multi-Camera Monitor

What will be an ideal response?

Computer Science & Information Technology

?Although many authors use a more conversational style for e-mail, users should remember that e-mail messages often are forwarded to other recipients or groups,and so you must consider the users to whom it might be distributed.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

List the set of numbers in numerical order from lowest to highest.

A.
B.
C.
D.
E.

Computer Science & Information Technology

Which of the following would you be most likely to use RFID technology for?

a) tracking inventory b) enabling CRM systems c) lowering network costs d) enabling client communication

Computer Science & Information Technology