正在加载图片...
7 The static structure:classes minng the software background ofiscussyou have reasons for demanding a better approach to modular design:reusability and extendibility You have realized the limitations of traditional approaches:centralized architectures limiting flexibility.You have discovered the theory behind the object-oriented approach: abstract data types.You have heard enough about the problems.On to the solution! This chapter and the others in part C introduce the fundamental techniques of object- oriented analysis,design and programming.As we go along,we will develop the necessary notation. Our first task is to examine the basic building blocks:classes. 7.1 OBJECTS ARE NOT THE SUBJECT What is the central concept of object technology? Think twice before you answer "object".Objects are useful,but they are not new. Ever since Cobol has had structures;ever since Pascal has had records;ever since the first C programmer wrote the first C structure definition,humanity has had objects. Objects are stud- Objects remain important to describe the execution of an O-O system.But the basic iedinderailin the notion,from which everything in object technology derives,is class,previewed in the next chapter. preceding chapter.Here again is the definition: Definition:class A class is an abstract data type equipped with a possibly partial implementation. Abstract data types are a mathematical notion,suitable for the specification stage (also called analysis).Because it introduces implementations,partial or total,the notion of class establishes the necessary link with software construction -design and implementation.Remember that a class is said to be effective if the implementation is total,deferred otherwise.7 The static structure: classes Examining the software engineering background of our discussion, you have seen the reasons for demanding a better approach to modular design: reusability and extendibility. You have realized the limitations of traditional approaches: centralized architectures limiting flexibility. You have discovered the theory behind the object-oriented approach: abstract data types. You have heard enough about the problems. On to the solution! This chapter and the others in part C introduce the fundamental techniques of object￾oriented analysis, design and programming. As we go along, we will develop the necessary notation. Our first task is to examine the basic building blocks: classes. 7.1 OBJECTS ARE NOT THE SUBJECT What is the central concept of object technology? Think twice before you answer “object”. Objects are useful, but they are not new. Ever since Cobol has had structures; ever since Pascal has had records; ever since the first C programmer wrote the first C structure definition, humanity has had objects. Objects remain important to describe the execution of an O-O system. But the basic notion, from which everything in object technology derives, is class, previewed in the preceding chapter. Here again is the definition: Abstract data types are a mathematical notion, suitable for the specification stage (also called analysis). Because it introduces implementations, partial or total, the notion of class establishes the necessary link with software construction — design and implementation. Remember that a class is said to be effective if the implementation is total, deferred otherwise. Definition: class A class is an abstract data type equipped with a possibly partial implementation. Objects are stud￾ied in detail in the next chapter
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有