Write a subroutine in VB.Net called checkWeeds that counts the number of weeds in a garden grid.
The garden is represented as a 3x3 2D array of strings, where weeds are represented by the string "W".
An example of the garden array is shown in Figure 1 below:
Figure 1
| 0 | 1 | 2 | |
|---|---|---|---|
| 0 | Rose | W | Tulip |
| 1 | W | Daisy | W |
| 2 | Lily | W | Orchid |
Daily care routines require you to identify if the garden is becoming overgrown.
The subroutine should:
garden as a parameter"W" elements in the array"Overgrown" if there are five or more "W" elements in the array"W" elements if there are fewer than five.You must write your own counting routine utilizing nested loops and not use any built-in search or counting functions that might be available in VB.Net. You can assume the nested loops will iterate over a fixed 3x3 grid.
You should use meaningful variable names and correct VB.Net syntax in your answer.