Abstract principles include two aspects of process abstraction and data abstraction. Process abstraction means that any sequence of operations that completes a deterministic function can be viewed by the user as a single entity, although it may actually be done by a series of lower-level operations.
Data abstraction defines data types based on actions applied to the data, and limits the value of the data to be modified and observed only by these operations. Data abstraction is the core principle of OOA. It emphasizes the combination of data attributes and operations services into an irreducible system unit that is, an object , and the outside of the object simply needs to know what it does without knowing what it does.
The application of the principle of inheritance in OOA is that in each general-special structure formed by a general class and a special class, an object instance of the general class and an object instance of all special classes are collectively provided with properties and services that are explicitly defined in the general class at once.
In a special class no longer repeats the definition of what is defined in a generic class, but semantically, the special class automatically and implicitly owns all of the properties and services defined in its generic class and all the higher-level generic classes.
The advantage of the inheritance principle is that the system model is more concise and clearer. The classification principle is actually a form of representation when an abstract principle is applied to an object description. The reason that people can be associative is that there is indeed some connection between things. Communication through messages is caused by the encapsulation principle. In OOA, a message connection is required to represent a dynamic relationship between objects. Therefore, it is necessary to control its own field of view: When considering the overall situation, pay attention to its large components, temporarily unknown to each part of the specific details, consider a part of the details of the rest of the temporary aside.
This is the principle of granularity control. The various behaviors in the problem domain consist of a large number of things, which are often interdependent and interwoven with each other.
When using OOA to specifically analyze a thing, the following five basic steps are generally followed:. The first step is to determine the objects and classes. The object here is an abstraction of the data and how it is handled, reflecting the ability of the system to preserve and process information about certain things in the real world. A class is a description of a common set of properties and methods for multiple objects, including a description of how to create a new object in a class.
The second step is to determine the structure structure. Structure refers to the complexity of the problem domain and the connection relationship. The class member structure reflects the generalization-specialization relationship, and the whole-part structure reflects the relationship between the whole and the local. The third step is to determine the subject subject. The topic refers to the general picture of things and the overall analysis model. Fourth step, determine the attribute attribute.
A property is a data element that can be used to describe an instance of an object or classification structure, given in the diagram, and specified in the object's storage. The fifth step is to determine the method. Methods are some of the processing methods that must be made after a message is received: The method is defined in the diagram and specified in the object's storage.
For each object and structure, the ones used to add, modify, delete, and select a method are inherently implicit although they are defined in the object's storage, but not on the diagram , while others are displayed. The object-oriented design object-oriented Design,ood method is an intermediate transition in the Oo method.
Object-oriented design OOD is a kind of software design method and an engineering norm. There is no doubt about it. According to Bjarne Stroustrup, the object-oriented programming paradigm Paradigm is [Stroustrup, 97]:.
By this definition, we can see that Ood is "deciding on the requirements of the class, the operation of the class, and the process associated with the class. The goal of Ood is to manage the interdependence of parts within the program. In order to achieve this goal, Ood requires that the program be partitioned into chunks, each of which should be small to manageable, and then hide each block behind the interface interface , allowing them to communicate with each other only through interfaces.
For example, if you use Ood method to design a server-client client-server application, then the server and the client should not have a direct dependency, but should make the interface of the server and the interface of the client depend on each other. The transformation of this dependency makes the parts of the system reusable. In the example above, the client does not have to rely on a particular server, so it can be reused in other environments.
If you want to reuse a block, just implement the necessary interface. Ood is a design paradigm for solving software problems paradigm , an abstract paradigm. Using the design paradigm of ood, we can use objects object to represent the entities of the problem domain problem domain , each with corresponding states and behaviors.
We have just said that Ood is an abstract paradigm. Abstractions can be divided into layers, from very generalized to very special, and objects may be at any level of abstraction. In addition, objects that are different but interrelated can form an abstraction: As long as there is similarity between these objects, they can be treated as objects of the same class.
Computer hardware technology is developing rapidly. From a mysterious behemoth decades ago to a mobile chip that is now portable, from thousands of operations per second to times operations per second. When software developers are still looking for a "silver bullet" [Brooks, 95] that can improve the productivity of software development, the productivity of hardware development has already been raised hundreds of thousands of times.
Hardware engineers can be so efficient because they are lazy. They always adhere to the "Don't reinvent the wheel" adage. Grady Booch called these black boxes a class category, and now we often call them "components component ". OOD is not a silver bullet to solve all design problems, avoid software crises, and defend world peace OOD is just a technology.
However, it is an excellent technology, it can solve most of the software design problems at the moment-of course, this requires the designer to have sufficient ability. OOD may give you a headache. Because it is very difficult to learn and master it.
OOD will even disappoint you. Because it is also immature and imperfect. OOD will also bring you joy. It allows you to focus on design without worrying about the details; OOD will also make you a better designer.
It can provide you with very good tools, allowing you to develop more robust, maintainable, and reusable software. Object -oriented programming is a computer programming architecture. A basic principle of OOP is that computer programs are composed of individual units or objects that can function as subroutines. OOP has achieved the three main goals of the software project: reusability, flexibility and scalability.
In order to realize the overall operation, each object can receive information, process data and send information to other objects. Component-the unit formed by data and function together in the executing computer program. Component is the basis of module and structure in OOP computer program. Abstraction-The program has the ability to ignore certain aspects of the information being processed.
That is, the ability to focus on the main aspects of information. Encapsulation-also called information encapsulation: to ensure that components do not change the internal state of other components in unexpected ways; only in those components that provide internal state change methods. Capable of accessing its internal state. Each type of component provides an interface to communicate with other components and specifies the methods for other components to call.
Polymorphism-component references and class sets will involve many other different types of components, and the result of referencing components depends on the type of actual call. Inheritance-agree to create sub-class components on the basis of existing components, which unifies and enhances polymorphism and encapsulation. Typically, classes are used to group components, and new classes can be defined as extensions of existing classes, so that classes can be organized into a tree or network structure, which reflects the universality of actions.
Because of abstraction, encapsulation, reusability, and ease of use, component-based programming has become particularly popular in scripting languages. The popular Perl scripting language has slowly added new object-oriented functional components starting from version 5.
Design patterns , technology and intuition pose serious challenges. In the growth of network applications. A very important part is the explosive growth of small mobile devices and special Internet devices. Each of these devices has its own operating system, or only has a common operating system in a specific device field. We can also list these devices-home access devices, cellular phones, electronic newspapers, PDAs, self-active network devices, and so on. But the number and depth of these equipment fields will quickly become incalculable.
We all know that this market is surprisingly big. The rise of the PC is just a piece of cake. Therefore, in the application market for these devices, competition will be quite brutal. One of the important means of winning is to enter the market as soon as possible. Platform independence is also one of the winning secrets, which allows programmers to develop software that supports multiple device platforms. Another change I expect is that our ability to develop code Java and data XML collaborative applications will continue to improve.
Such collaboration is one of the core goals of developing powerful applications. Can we expect a truly component-oriented language?
Who will be its creator? Stroustrup: I suspect that the lack of results in this field is precisely because people-mainly non-programmers-place too much expectation on the vague term "component". These people dream. One day, components will drive programmers out of the stage of history in some way. In the future, those competent "designers" only need to use the pre-adjusted components, drag and drop the mouse to assemble the system.
For software tool vendors, this idea has another meaning. They feel that only they will retain the necessary technology and have the ability to write such components. There is a major fallacy with this idea: it is very difficult for such a component to gain widespread popularity. A single component or framework framework. Assuming that most of the requirements put forward by an application or an industry field can be met, it is a cost-effective product for its manufacturer, and it is not very technically difficult.
But a few competitors in the industry will find out very soon. Assume that everyone uses these components. Then the products between each other will become the same. It makes no difference. Small "components" are very practical, but they can't produce the expected leverage effect. Medium-sized, more general-purpose components are very practical, but they require extraordinary flexibility in construction. I look forward to some interesting and practical results in this field.
Lindholm: Writing component-oriented applications, it seems that many other issues are investment, design, and program management issues. It is not a programming language issue. It is purely misleading to suppose that there is a magical new language that can greatly simplify the difficulty of writing components. Face new challenges. It will rise to respond. A language that has created so many excellent systems will never "sit back and watch the flowers go by.
It is also a weapon to meet high performance requirements. Will C gain widespread acceptance and squeeze out other languages? Lindholm: Usually, a language neither benefits from other languages, nor is it crowded out. Don't those stalwart Fortran programmers still use Fortran? For individuals. The choice of language certainly varies from time to time, but in general.
In other words. The relationship between them is "you and me" rather than "you but me". Acceptance of a new language. Often depends on its ability. Java technology is quickly accepted for many reasons, the Internet and World Wide Web interfaces. The frustration in front of other technologies, the ability to fully influence the development direction of Java technology.
Are all reasons. Another important reason is that Java is independent of vendors, which means that you can choose between compatible products. Will C gain widespread acceptance? It depends on the situation. In general. Those programmers who are indifferent to platform independence and vendor independence may like C. Those who are tied to the Microsoft platform may certainly want to look for an excellent alternative to VB and VC.
Such capabilities are essential for multiple access devices and distributed computing models, and the Java language provides a standard, vendor-independent execution environment. Stroustrup: The popularity of C is almost entirely dependent on the amount of money Microsoft invests. It seems that the rise of C will certainly sacrifice the interests of other languages, but it is not necessarily the case. I really don't see any need to invent a new proprietary language. Development vs. Evolution vs.
In the special class, we no longer repeatedly define what has been defined in the general class, but semantically, the special class automatically and implicitly owns all the attributes defined in its general class and all higher-level general classes. The advantage of the inheritance principle is that it makes the system model simpler and clearer. The classification principle is actually a form of expression when the abstract principle is applied to object description.
The reason people can associate is that there are indeed some connections between things. Communication through messages is caused by the principle of encapsulation. In OOA, it is required to use message connections to express the dynamic relationship between objects. Therefore, you need to control your vision : when considering the overall situation, pay attention to its large components, and temporarily do not examine the specific details of each part; when considering the details of a certain part, temporarily leave the rest.
This is the principle of granular control. The various behaviors in the problem domain composed of a large number of things are often interdependent and intertwined. Two, object-oriented analysis produces three analysis models1. The main advantages of OOA 2 Improve the communication between various personnel related to analysis; 3 Have strong adaptability to changes in demand; 4 Support software reuse.
Fourth, the basic steps of the OOA method When using OOA to specifically analyze a thing, roughly follow the following five basic steps: the first step, determine the object and class. The object mentioned here is an abstraction of data and its processing methods, which reflects the ability of the system to save and process information of certain things in the real world. A class is a description of a collection of common attributes and methods of multiple objects.
It includes a description of how to create a new object in a class. The second step is to determine the structure. Structure refers to the complexity and connection of the problem domain. The class member structure reflects the generalization-specialization relationship, and the whole-part structure reflects the relationship between the whole and the part. The third step is to determine the subject. The theme refers to the overall overview of the things and the overall analysis model.
The fourth step is to determine the attributes. Attributes are data elements that can be used to describe instances of objects or classification structures. They can be given in the figure and specified in the storage of objects. The fifth step is to determine the method.
Methods are some processing methods that must be performed after receiving the message: the method is defined in the diagram and specified in the object storage.
For each peer , such as those used to increase and Structurally, modify, delete, and select a method itself is implicit although they should be, but is not given in FIG stored in the object defined , And some are displayed.
OOP directory [hidden] 1. The history of OOP technology 3. The advantages and disadvantages of OOP 4. The future of OOP 5. What are the advantages and disadvantages of different OOP languages? Sixth, development vs. The so-called "object" is a collection of data or a set of data and methods and processes for processing these data. Object-oriented programming is completely different from traditional process-oriented programming, it greatly reduces the difficulty of software development, making programming as simple as building blocks, is an unstoppable trend in computer programming today.
A basic principle of OOP is that a computer program is composed of a single unit or object that can function as a subprogram. OOP has achieved three main goals of software engineering: reusability, flexibility and scalability. In order to realize the overall operation, each object can receive information, process data, and send information to other objects. OOP mainly has the following concepts and components: components-units formed by data and functions together in a running computer program, and components are the basis of modules and structure in the OOP computer program.
Abstraction-The program has the ability to ignore certain aspects of the information being processed, that is, the ability to focus on the main aspects of the information. Encapsulation-also known as information encapsulation: to ensure that a component does not change the internal state of other components in an unpredictable way; only those components that provide internal state change methods can access its internal state.
Each type of component provides an interface to communicate with other components, and specifies methods for other components to call. Polymorphism-References and collections of components will involve many other different types of components, and the results produced by referencing components will depend on the type of actual call. Inheritance-Allows the creation of subclass components based on existing components, which unifies and enhances polymorphism and encapsulation.
Typically, you use classes to group components, and you can also define new classes as extensions of existing classes, so you can organize classes into a tree or mesh structure, which reflects the versatility of actions.
Because of abstraction, encapsulation, reusability, and ease of use, component-based programming has become particularly popular in scripting languages. Unlike functional-programming and logic-programming, which are close to the actual calculation model of the machine, OOP hardly introduces precise mathematical description, but tends to establish An object model, which can approximately reflect the relationship between entities in the application domain, is essentially a calculation model that is closer to a philosophical view adopted by humans to recognize things.
This leads to a natural topic, what is OOP? In OOP, the object as the computing subject has its own name, status, and interface for receiving external messages. In the object model, new objects are generated, old objects are destroyed, messages are sent, and response messages form the basis of the OOP calculation model.
There are two basic ways to produce objects. One is to generate new objects based on prototype objects. One is to generate new objects based on classes. The concept of the prototype has been used in cognitive psychology to explain the incremental nature of concept learning.
The prototype model itself is an attempt to generate a variety of new objects by providing a representative object, and thus continue to produce more consistent The actual application object.
The prototype-delegation is also an object abstraction in OOP, a kind of code sharing mechanism. A class provides a general description of one or more objects. From a formal point of view, classes are related to types, so a class is equivalent to a collection of instances generated from that class. This kind of viewpoint will also bring some contradictions. The most typical is that under the inheritance system, the behavioral compatibility between the subset subclass object and the parent set parent class object may be difficult to achieve, which is OOP is often quoted subtype subtype is not equal to subclass subclass [Budd ].
In the context of a world view in which all objects are objects, a new object model with a metaclass is born based on the class model. That is, the class itself is an object of other classes. The above three fundamentally different viewpoints each define three class-based, prototype-based and metaclass-based object models.
Separate component implementation and interface, and make components polymorphic. However, the two are fundamentally different. You have to inherit, use classes, use objects, and objects pass messages.
That is, what does it mean that two things are equal? How to correctly define the equality operation? Not only is the equality operation so simple, you will find that the general concept of "equal" means that the two object parts, or at least the basic parts, are equal, so we can have a general equality operation.
Let me talk about the types of objects. Suppose there is a sequence sequence and a set of operations on the sequence sequence. So what are the semantics of these operations? From the perspective of complexity trade-offs, what order sequence should we provide to users?
What operations exist on this kind of sequence? What sort of sorting do we need? Only by clarifying the conceptual classification of these components can we mention the question of implementation: use templates, inheritance, or macros?
What language and technology are used? The basic view of gp is to classify abstract software components and their behavior with standard taxonomy. The starting point is to build real, efficient and language-independent algorithms and data structures.
Of course, the ultimate carrier is language, and no language can't be programmed. Binary search and sorting is used everywhere, and this is what people are doing.
But the basic difference is clearly the semantics on which gp depends, and the semantic decomposition. For example, we decided to need a component swap, and then pointed out how this component works in different languages.
Obviously the focus is on semantics and semantic classification. What oop emphasizes I think it is too much emphasis is to clearly define the hierarchical relationship between classes. Oop tells you how to establish hierarchical relationships, but it does not tell you the essence of these relationships. This paragraph is not easy to understand, some terms may take some time to have a suitable Chinese translation-translator Object-oriented programming method OOP is a software programming method that was popular only in the s.
It emphasizes the "abstraction", "encapsulation", "inheritance" and "polymorphism" of objects. From a macro perspective, the objects under OOP are programming-centric and program-oriented.
The OOD we are going to talk about today is an information-oriented object, centered on user information. Second, the history of OOP technology Object-oriented technology initially began with object-oriented programming, and its emergence was marked by the simula language in the s. In the mid-to-late s, object-oriented programming gradually matured and was understood and accepted by the computer industry. People began to further consider the problem of object-oriented development.
However, it makes the driver forget to turn off the lights because of the beautiful scenery. After the analysts analyze the results, they form the earliest demand model; it may be a sketch, a feasibility analysis XX report; designers get this model for refinement, Modular, define all the details, that is, detailed drawings, or detailed requirements analysis specifications, here, there may be the location, length, width, height, capacity, light, materials, equipment, electronic eyes, safety Wait, here is the specific requirements document.
The designer's design work is completed, they are OOD. OOP is the construction team.
0コメント