Hello, why does this code not yield an Area of 1 for all objects that implement Shaper by embedding the Shape ‘abstract’ type?
I’m trying to solve the exercise 11.2.3 from “The Way to Go”. Unfortunately it does not provide any solution. The text is as follows
“Now we will implement the same functionality by using an ‘abstract’ type Shape (abstract
because it has no fields) which implements Shaper, and embedding his type in the other
types. Now demonstrate that overriding is used as explained in § 10.6.5: interfaces_