Well, I have heard that Y is a vowel. I'm not so sure about W. Like other consonants, W can't produce a sound on its own; it needs to be next to a vowel in order to be pronounced. Of course, there are exceptions, like S and Z. But all vowels can be pronounced without any consonants. W clearly cannot.
The W sound isn't actually the "oo" sound, though. It's the sound that's created when you transition from an "oo" sound to another vowel, by moving the lips a certain way (similar to B, P, and M, but without placing the lips together). Try it. Even in words without a W, like Spanish agua, there's a W sound that occurs between the U and the A. If pronounced quickly, the U can sound like a W, making the word sound like it could be spelled agwa. So the W and the U or "oo" sound are very closely related.
To me, W is a special consonant that can only be created when preceded and followed by a vowel (like the short, almost silent "oo" in the word what), unlike other consonants that can occur with either a preceding or a following vowel.