A student is writing a program to predict the outcome of a fight between heroes and an opponent.
The conditions state that:
It would require six or more heroes to defeat the opponent without kryptonite.
If the heroes have kryptonite, between 3 and 5 (inclusive) heroes could defeat the opponent.
The procedure will be defined as such:
PROCEDURE can win (kryptonite, heroes)
{
The parameter kryptonite expects a Boolean value.
The parameter heroes expects a number of heroes.
The procedure will RETURN TRUE if the heroes win, or FALSE if not.
Which of the following procedures satisfies the requirements given above?
Elimination Tool
The conditions state that:
It would require six or more heroes to defeat the opponent without kryptonite.
If the heroes have kryptonite, between 3 and 5 (inclusive) heroes could defeat the opponent.
The procedure will be defined as such:
PROCEDURE can win (kryptonite, heroes)
{
The parameter kryptonite expects a Boolean value.
The parameter heroes expects a number of heroes.
The procedure will RETURN TRUE if the heroes win, or FALSE if not.
Which of the following procedures satisfies the requirements given above?
Elimination Tool