In the previous blog post I wrote about changing interfaces using a Java class as an example.
The public interface of the final implementation was:
constructor: (int, int) methods: getWidth() -> int getHeight() -> int getArea() -> int setWidth(int) setHeight(int)
There were no public fields, all were accessible with the setters and getters.
There was also a C# example with the properties. This way I had the public interface like:
constructor: (int, int) fields: int width int height
Because of the properties those fields were also writable.