Especially when you do it for 4 years.
If you need to take out $40k in loans, the school is too expensive.
You can save nearly $5k by opting out of the health insurance and choosing a less expensive dorm option.
http://financialaid.ucsc.edu/costs/2015-16%20undergraduate-costs.html
http://housing.ucsc.edu/rates/index.html
Books and Supplies is probably high too - taking you down to about $5k per year shortfall.
I bet you could probably make $5k per year working summers.
Congrats and good luck.