Coming from Java, I am unsure about Scala's three ways of defining things. I see class Sensor(id: Int), object Config and case class Reading(sensorId: Int, value: Double) in the same project, and sometimes a class and an object with the same name in one file. Reading(1, 2.5) == Reading(1, 2.5) is true, but two new Sensor(1) instances are not equal.
What does each construct provide, and how do I decide between them?




