I am reading Numerical Analysis and I have some problems on how to use in practice the definition of the '$\textbf{Degree of Exactness}$'.
$\textbf{Definition:}$ Let $I_n(f)$ be a quadrature formula for integrating $f$ in the interval $[a,b]$ and $I(f)$ be the actual value of the integral. The Degree of Exactness of a quadrature formula is defined as the maximum integer $r\geq0$ for which $I_n(f)=I(f)$, $\forall f \in \mathbb{P}_r$ ($f$ is from the polynomials of degree $r$).
I understand the definition but how can I use it to compute the actual degree of exactness of a quadrature formula, for example the following question and the following theorem (from Numerical Mathematics, Quarteroni).
$\textbf{Example:}$
Compute the degree of exactness for the formula: $$I_3(f)=\frac{1}{4}[f(-1)+f(-\frac{1}{3})+f(\frac{1}{3})+f(1)]$$
$\textbf{Theorem:}$
Any interpolating quadrature formula that makes use of $n+1$ distinct points has degree of exactness equal to at least $n$.
And could anyone please provide any links to some examples of this type or maybe some reading that explain this subject in depth.