Do it like a turtle

Report a typo

We have the following trait:

trait Pet:
  def breath: String = "breath"
  def eat: String

Place the override keyword where needed so that the code will compile.

Sample Input 1:

Sample Output 1:

Write a program in Scala 3
class Turtle extends Pet:
??? def breath: String = "another breath"
??? def eat: String = "eat"
??? def play: String = "play"
___

Create a free account to access the full topic