In my point of view I think that you can go more further in term of Single Responsibility Principle(RSP). But I’m not really sure if it relevant to make an interface for Editor.
class Image{
string path
}
Image image = new Image();
interface Rotatory {
rotate(image);
}
class RightRotator implements Rotatory{
rotate(image){
/*Your implementation*/
}
}
class LeftRotator implements Rotatory{
rotate(image){
/*Your implementation*/
}
}
interface Editor{
change(image);
}
class Brightness implements Editor{
change(image){
/*Your implementation*/
}
}
solved Which OO Design is better and why? [closed]