Answer:
The following are the code in the Java Programming Language.
//set the for loop
for (k = 0; k < nMembers; k++)
{
//check that currentMembers[k] is equal to the memberID
if (currentMembers[k] == memberID)
{
//then, initialize isAMember to true
isAMember = true;
//and initialize the value of nMembers in k
k = nMembers;
}
//otherwise
else
{
//initialize isAMember to false
isAMember = false;
}
}
Explanation:
The following are the description of the program.