Answer the question
In order to leave comments, you need to log in
What interfaces should be created?
Do you think interfaces should be created for the client/task, or should they be as universal as possible, not tied to the context?
example:
interface IPerson
{
public function move();
public function eat();
public function sleep();
public function work();
}
interface IMove
{
public function move();
}
interface IEat
{
public function eat();
}
interface ISleep
{
public function sleep();
}
interface IWork
{
public function work();
}
Answer the question
In order to leave comments, you need to log in
And if, for example, we had a separate IMove interface, then we could implement it in any module / component, for example, in a conditional File, because we can move the file. It's the same with ISleep, you never know what can fall asleep, starting from the operating system or the execution thread, ending with a character in Tamagotchi.
filesystem.Movable
graphics.2d.Movable
graphics.3d.Movable
servo.Movable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question