One of the
characteristics of a well-designed object is that it offers focused functionality.
In other words, an object, ideally, should not do various unr elated things.Encapsulating the logging, counting and other similar functionality into a
separate object leaves the service provider object with only the functionality
that it is designed to offer. In other words, it allows the service provider object
to perform. a well-defined, definite task.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16792402/viewspace-584288/
,如需转载,请注明出处,否则将追究法律责任。