I have seen many cases where we can create a Scala project with only Scala object file and have our code inside it without the need of having a Scala class file.
I am currently working in a project where the Developer has written the code in the Scala object
file (which acts as an object) instead of writing in a class
file. To be more precise here is the screen shot of my IDE which shows that the code is written in an object file.
I want to know significance of writing a code in a Scala class and object file. What is the ideal scenario to use them? There is a similar post available here which shows only the difference between a class and an object however I want to know when should I consider to use a Scala class and when to use a Scala object?