If the slots need square corners, then they'll need some form of slotting or broaching.

That could be achieved in a mill or a lathe with a suitable attachment.
As for the main machining of the cup, a lathe would be most suited, but it all depends on what machines you have available.