Answer
See the explanation
Work Step by Step
determine the equation of the line passing through the points $(-2,-2)$ and $(2,2)$:
$y-2=\dfrac{2-(-2)}{2-{-2}}(x-2)$
$y-2=x-2$
$y=x$
The formula for the piece-wise function graph is as follows:
$f(x)=$ $\begin{cases}
-2 & \text{if} & x \lt -2\\
x & \text{if} & -2\leq x \leq 2\\
2 & \text{if} & x \gt 2
\end{cases}$