Intel Core i5 can run Microsoft Windows as a guest in Parallels or otherwise, or via Boot Camp. Slowly. I’d want 16 GB memory and more would be preferable for a hypervisor and development.
Or somewhat less resource-intensive… Install Boot Camp.
https://support.apple.com/boot-camp
Acquire and install Microsoft Windows.
Microsoft has available 90-day test images.
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
Windows hosting and Linux hosting is widely available.
https://www.techradar.com/news/best-windows-hosting
AWS has a free tier available for a year:
https://aws.amazon.com/windows/?blog-posts-content-windows.sort-by=item.additionalFields.createdDate&blog-posts-content-windows.sort-order=desc
(Do be careful to shut down your hosted guests, just as soon as you’re done.)
A computer science class using Code::Blocks? For what seems an intro course (and C, C++, and Fortran are all odd choices for an intro course), I’d tend to expect the instructor provide a pre-built guest image (prolly Linux) and the steps to install and use same. Saves on the arriving questions for the instructor. This seems a “toss’m into the deep end” class. But then I’ve been out of school for a while. Ah, well.