Many object-oriented languages including C #, anything Don'T bid to force software developers to create well designed. No better example of this than when using C + + to implement an object-oriented design. C # is a little more structured than C + +, for example, can not be created without static functions that exist outside the context of a defined type. However, C # does not obligate you to create software that adheres to known practices of good software design.
The C + + community quickly identified some canonical forms useful for the design of rates to meet a specific purpose. Really, these canonical forms are nothing more than checklists, or recipes, you can use while designing new classes. Before a pilot can clear an aircraft to return through the door, you must go through a strict checklist. The purpose of this chapter is to identify and checklists for creating robust in the world types in C #.
In exploring these checklists, we must consider what kind of behavior will require new types of objects you are creating. For example, the new rate will be Cloneable? In other words, it can be copied? Is it supported the new order type, if the cases are placed in a collection? What does it mean to compare two references of this kind of object for equality? In other words, you want to know if the two references are to the same instance? Or want to know if two recent cases have exactly the same state? These are the types of questions you should ask when creating a new type.
0 comments:
Post a Comment