The essence of object-oriented programming is representing elements of the real world using classes that describe their behavior through methods. In specific scenarios, such as configurations and main entry points, you need to instantiate a coding element at most once; you usually call it singleton. In Scala, you can create singletons using objects elegantly and concisely. You are also encouraged to clearly distinguish between static and non-static methods; the non-static ones act on a specific instance of a class, while the static ones belong to its general definition. In Scala, you implement non-static methods in a class and static methods in an object. In the capstone, you’ll use an object to define the main entry point of your application.
abstract class Robot(name: String) { def welcome: String }