In the following code, which conditions will lead to the booleans continue and need Fill to both be true?
halfFull = (currentTank > fullTank * .5);
full = (currentTank == fullTank);
empty = (currentTank == 0);
almostEmpty = (currentTank < fullTank * .25)
if (full || halfFull) {
continue= true;
needFill = false;
}
else if (almostEmpty && !Empty ) {
continue = true;
needFill = true;
}
else {
continue = false;
needfill = true;
}
Question 13 options:
almostEmpty == true && empty == false
full == true || halfFull == true
almostEmpty == true || empty == false
almostEmpty == true && halfFull == true