I'm not a CS major, but I do a lot of coding for data analysis stuff. My advice:
1. Buy an low/medium end laptop (whatever that means to you) laptop that gets good reviews for durability. Most any decent modern laptop will be powerful enough to run the type of code you'll be writing now. I wouldn't get less than 8gb of ram and would insist on a solid state drive, but assuming that those benchmarks are met, find something that isn't super expensive because you need to:
2. Buy a bigger external monitor. 21 in monitors are available for 100 bucks now. 24 in models aren't that much more expensive. In my mind, this is the best investment you can make for overall computing happiness.
Soon enough you'll have the assignment window, your code, 3 tabs of Stack Overflow and who knows what else open. Being able to see them all at once is a huge time saver. You can even code on your laptops screen and keep all the other references on the other screen. Simply looking at your code on a big screen can make things seem easier sometimes and is certainly easier on the eyes.
Plus, you can watch movies/TV on the bigger monitor in your dorm room.
I personally use a 13in Macbook Pro. It works well. I could run Windows on it if need be (and I believe you can run OSX virtually from a Windows machine, but I've not done it). I'm not an Apple true believer though. Windows 10 seems like a nice operating system. I wouldn't worry about getting into either ecosystem.
Where are you going? I might ask the CS department there if they have a prefernce.