6.9k views
0 votes
Create an if function in which the logical_test argument determines if there are 8 or more seats.

User Marites
by
5.6k points

1 Answer

5 votes

Answer:

public static boolean ifTest(int numSeats){

if(numSeats>=8){

return true;

}

else

return false;

}

Step-by-step explanation:

Using Java programming language, A method has been created with one parameter numSeats With a boolean return type. In the method's definition, an if statement is used to check if the number of seats is greater or equal to 8, if this is so, it returns true, else it returns false

User Genghis
by
6.2k points