2 ответов
+ 1
You can code it in one.
https://code.sololearn.com/cjGIfr8I4Fu2/?ref=app
+ 2
You can define your classes in your main file. When you have a lot of them, or when they are big, or you want to use them in multiple programs it makes sense to put them into a separate file. But that's not a necessity.