- Write a class Person with a constructor fields
name and a method sayHello
- Instantiate the Person and call the sayHello method
- Write an object Person with a method apply
- Instantiate a Person with the companion object
- Write a case class
Person with a constructor field name and a method sayHello
- Instantiate the Person (with the generated companion object)
- Write a class Customer with a constructor field
name that extends Person
- Instantiate the Customer and call the
sayHello method
- Write a trait Greeter with a
sayHello method
- Use the Greeter on the Customer and call the sayHello method