Question: Given the method: public int getNumFires ( String cause ) { } . Return the number of fires caused by the parameter cause by checking

Given the method: public int getNumFires
(
String cause
)
{
}
.
Return the number of fires caused by the parameter cause by checking if the cause of the fire is the same as the parameter cause using the equals
(
)
method. Only count fires where the length of the name of the fire is greater than
6
by using a nested if statement to check if the length of the fire's name is greater than
6
. In TheaterRunner.java, call the drawResult() method with the 1D array returned from calling the getNumFires() method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!