II. (16 points) Find the maximum and minimum values of the quadratic function $y=x^{2}+m x+m$ in the interval -3 $\leqslant x \leqslant-1$.
$$
\begin{array}{l}
\text { 2. } y=\left(x+\frac{m}{2}\right)^{2}+ \\
\frac{4 m-m^{2}}{4},
\end{array}
$$

The graph of the given function moves left and right and up and down as $m$ takes different values.
When $-2 \leqslant-\frac{m}{2} \leqslant 6$, $x=-\frac{m}{2}$ is to the left of $-3 \leqslant x \leqslant$ -1, then
$x=-3$ gives $y_{\text {min}}=9-2 m$,
$x=-1$ gives $y_{\text {max}}=1$.
When $-\frac{m}{2} \geqslant-1$ i.e., $m \leqslant 2$, $x=-\frac{m}{2}$ is to the right of $-3 \leqslant x \leqslant$
-1, then
$x=-1$ gives $y_{\text {min}}=1$,
$2 m$.