I've put all of my classes into separate header files. So I have a file named `snake` for the `Snake` class and a `fruit` file for a `Fruit` class etc. I'm familiar with the concept of using a header file for declaring a class and its methods and then defining the methods in a separate `.cpp` file with the same name. All of that makes sense to me and I've done that in the past.

My question is: Is it considered a bad practice to implement the simplest methods inside the header file without a separate `.cpp` file? Or maybe I should put the whole class in the `.cpp` file instead?

The reason why I'm asking this is that some of my classes only consist of 2 or maybe 3 *set* and *get* member functions and I don't see a point in creating a separate file for less than 10 lines of code. In fact I believe it would make my code unnecessarily complicated. I looked online and some people say it's fine, others say it's not.