There is a university near me that offers semester cruises. I think the program is termed Semester at Sea. For the cost of the program you actually study and receive credits as if you were on a college campus. In addition, you have the opportunity to sail to interesting cities and locales around the world.
The actual destination depends on the cruise scheduled for the particular semester. I think these are more often river cruises where the ship will be passing many cities, rather than spending days at sea in the ocean.
I can't think of a better way to earn a college degree, but the semesters are rather expensive, so four years at sea might be a bit much. However, one semester is definitely worth the expense if you can afford it.