Question: Java public interface ArrayStackADT<T> {/** Adds one element to the top of.
Java
1. Introduction
The Western Power Company (WPC) has an electrical grid that allows customers. The grid consists of a set of electrical switches and cables. A n whether WPC can provide electricity to its property. For this assignment, y a program in Java to determine whether the electrical grid of WPC can deli C: The program needs to determine whether the set of electrical switches form a path from WPC (where the electricity is generated) to C's house.
You are given a map of the city, which is divided into rectangular cells to: the required path. There are different types of map cells:
an initial map cell, where WPC is located, a map cell where the house of customer C is situated, map cells containing blocks of houses of other customers, map cells containing electrical switches. There are 3 types of elect o omni switches. An omni switch located in a cell L can b neighboring map cells of L. A cell L has at most 4 neighb as the north, south, east, and west neighbors. The omni swit all neighbors of L; overtical switches. A vertical switch can be used to connect of a map cell; o horizontal switches, A horizontal switch can be used t neighbors of a map cell.
The following figure shows an example of a map divided into cells. Each m cells indexed from 0 to 3. Given a cell, the north neighboring cell ha neighboring cells are indexed in clockwise order. For example, in the figu 6 are indexed from 0 to 3 as follows: Neighbor with index 0 is cell 3, ne neighbor with index 2 is cell 7, and neighbor with index 3 is cell 11. No than 4 neighbors and the indices of these neighbors might not be consecuti 9 in the figure has 3 neighbors indexed 0, 1, and 3.
A path from the WPC cell (cell number 1 in the figure to C's house (cel 1, 2, 3, 4, 5, 6, 7, 9, 10. Note that a path cannot go from cell 3 to cell 6, be cell 3 only connects cells 2 and 4. Similarly from cell 5 a path cannot go not possible to go to cell 10. Since cell 11 does not contain a switch, such