In languages such as Java, we usually see a class that implements an interface with a clone method, which returns a new instance of the class. Consider the following diagram:
In the next section, we will provide a code example of the prototype design pattern from the point of view of Scala.