Step 1: Graphing the constraints.
The constraints are:
\[
x + y \leq 4, \quad x \geq 0, \quad y \geq 0
\]
These inequalities describe a region in the first quadrant of the \( xy \)-plane. The line \( x + y = 4 \) intersects the \( x \)-axis at \( (4, 0) \) and the \( y \)-axis at \( (0, 4) \).
Step 2: Maximizing \( Z = 3x + y \).
To maximize \( Z \), we evaluate \( Z \) at the vertices of the feasible region. The vertices are \( (0, 0) \), \( (4, 0) \), and \( (0, 4) \).
- At \( (0, 0) \), \( Z = 3(0) + 0 = 0 \)
- At \( (4, 0) \), \( Z = 3(4) + 0 = 12 \)
- At \( (0, 4) \), \( Z = 3(0) + 4 = 4 \)
Step 3: Conclusion.
Thus, the maximum value of \( Z \) is \( 12 \), which occurs at \( (4, 0) \).