(1) (20 points) There is a type of notebook originally priced at 6 yuan per book. Store A uses the following promotional method: for each purchase of 1 to 8 books, a 10% discount is applied; for 9 to 16 books, a 15% discount is applied; for 17 to 25 books, a 20% discount is applied; and for more than 25 books, a 25% discount is applied. Store B uses the following promotional method: for each purchase of 1 to 5 books, each book costs 5.6 yuan; for 6 to 10 books, each book costs 5.2 yuan; for 11 to 20 books, each book costs 4.9 yuan; and for more than 20 books, each book costs 4.5 yuan.
(1) A school has two classes, Class A and Class B, both of which need to buy this type of notebook. Class A needs 8 books, and Class B needs 20 books. Which store should they buy from to spend less money?
(2) Suppose a class needs to buy x (11 ≤ x ≤ 40) books of this type, and the total cost is y yuan. From the perspective of saving money, write the function relationship between y and x.
(1) Since Class $A$ needs 8 books, and the cost per book at Store A and Store B is 5.4 yuan and 5.2 yuan respectively, it is cheaper to buy from Store B.

Since Class $B$ needs 20 books, and the cost per book at Store A and Store B is 4.8 yuan and 4.9 yuan respectively, it is cheaper to buy from Store A.
(2) From the perspective of saving the most money, the function relationship between $y$ and $x$ can be obtained as
$$
y=\left\{\begin{array}{ll}
4.9 x, & 11 \leqslant x \leqslant 16 ; \\
4.8 x, & 17 \leqslant x \leqslant 20 ; \\
4.5 x, & 21 \leqslant x \leqslant 40 .
\end{array}\right.
$$