A comparison between structured methods and object-oriented methods

Source: Internet
Author: User

A comparison between structured methods and object-oriented methods

Structured approach

1 Overview

The structured method (SD method) is a traditional software development method, which is composed of three parts: structural analysis, structured design and structured programming. Its basic idea: the solution process of a complex problem is carried out in stages, and this decomposition is top-down, decomposition by layer, so that each phase of the problem is controlled by people easy to understand and deal with the scope.

2 Basic Ideas

The basic key points of the structured method are: top-down, step-refinement, modular design, structured coding.

The structural analysis method is based on the top-down, the gradual refinement as the base point, with a series of practical test is considered to be the correct principle and technology as a support, with Data flow chart, database dictionary, structured language, decision table, decision tree and other graphic expression as the main means, The software analysis method which emphasizes the structure rationality of the development method and the structure rationality of the system.

The structured design method is based on top-down, gradual refinement, modular as a base point, with modularity, abstraction, decomposition-by-layer refinement, information concealment localization and keeping the module independent of the design software data architecture and module architecture methodology.

Structured methods are divided into software lifecycles, structured analysis (SA), structured Design (SD), and structured implementation (SP). It should be emphasized that the structural methodology is a system of ideological standards, although there are clear stages and steps, but also integrates a lot of principles of things, so learn the structure of the method, not only from the theoretical knowledge to understand enough, to more or practice slowly understand the guidelines, Slowly turn it into your own methodology.

3. Analysis steps

The steps for structured analysis are as follows:

① analyzes the current situation and makes a DFD that reflects the current physical model;

② deduces the equivalent logical model of the DFD;

③ Design new logic system, generate data dictionary and primitive description;

④ establishes the human-machine interface and proposes a DFD for the physical model of the target system;

⑤ determine the cost and risk levels of the various programmes and analyze them accordingly;

⑥ Choose a scheme;

⑦ establish a complete requirements specification.

The structured design method gives a set of principles and techniques to help designers differentiate design quality at the module level. It is usually used in conjunction with the structured analysis method, and the module structure of the software is obtained based on the data flow graph. The SD method is especially suitable for the target system of transformed structure and transactional structure. In the design process, it is based on the structure of the whole program, using the module structure diagram to express the relationship between the program modules. The steps for structured design are as follows:

① review and refine the streaming chart;

② determine the type of the streaming diagram;

③ maps the flow chart to the software module structure, and designs the upper layer of the module structure;

④ based on the flow diagram to decompose the high-level module, design the lower module;

⑤ optimizes the structure of the module and obtains a more reasonable software structure.

⑥ describes the module interface.

Object-oriented approach

1. Introduction

As a new and unique method, object-oriented approach is attracting more and more attention and attention in the world, and it is regarded as "a good method to study high technology", which is the focus of the current computer industry. For more than more than 10 years, many experts and scholars have predicted that, as a result of the 70 's structural approach to the application of computer technology, the 90 OO approach will strongly influence, promote and promote a series of high-tech development and multidisciplinary integration.

Object-oriented design is essentially on the basis of requirements, summary design, division of objects → Abstract class → The organization of classes into hierarchical structure (inheritance and composition) → using classes and instances to design and implement several stages

The basic technique is to reduce the coupling degree of the program through encapsulation, inheritance, polymorphism. This material can be referenced in the design pattern

2. Characteristics

Encapsulation of

Encapsulation is an information concealment technique, which is embodied in the description of the class and is an important feature of the object. Encapsulation makes the data and the method (function) of processing the data encapsulated as a whole, in order to achieve a very independent module, so that the user can only see the external characteristics of the object (the object can accept which messages, with those processing power), and the object's internal characteristics (the preservation of the internal state of private data and the implementation of processing capacity algorithm) is The purpose of encapsulation is to separate the use of the object's designer from the object, and the user does not have to know the details of the implementation of the behavior, but only accesses the object with the information provided by the designer.

Inheritance of

Inheritance is the mechanism by which subclasses automatically share data and methods between parent classes. It is represented by the derivation function of the class. The entire description of a class directly following the other classes can be modified and expanded.

The secondary post has the reception of the front. The secondary is divided into single inheritance (a subclass has only one parent) and multiple inheritance (a class has more than one parent class). The objects of the class are closed, and if there is no inheritance mechanism, the data and methods in the class object will be duplicated a lot. Inheritance not only supports the reusability of systems, but also facilitates the extensibility of the system.

Polymorphism

The object is acting according to the received message. When the same message is accepted for different objects, it can produce completely different actions, known as polymorphism. The use of polymorphic users can send a common message, and all implementation details are left to the object receiving the message, so the same message can invoke different methods. For example, the printing method that is called when the print message is sent to a graph or table is completely different from the printing method that is called when the same print message is sent to a body file. The implementation of polymorphism is supported by inheritance, with the hierarchical relationship of class inheritance, the protocol with common function is stored at the highest level of class, and the different methods of implementing this function are placed at a lower level, so that the objects generated at these low levels can respond differently to generic messages. Polymorphism can be achieved in OOPL by redefining a base class function (defined as an overloaded function or virtual function) in a derived class.

Comparison

The most basic difference between object-oriented software development methods and structured software development methods is that they differ in their handling of functions and data.

The Structured software development method is to construct the system around the "process" of implementing the processing function. It is almost all about the function and the data separately. It follows a process-oriented problem solving approach. is to use the logic that the computer can understand to describe and express the problem to be solved and its concrete solution process. Data structures and algorithms are at the heart of it. Most of the changes in user requirements are functional. When developing systems with fuzzy requirements or dynamic changes in demand. The developed software system can not really meet the needs of users, may cause software cost growth out of control, software quality can not be guaranteed a series of serious problems. Therefore, software developed using a structured approach. Its stability, modifiable and reusability are poor.

The object-oriented software development method is to introduce the concept of "object" in the solution space. Realistically describe the objective entity of the solution space, so as to make the objective description conform to the human thinking habit. By identifying the object of the problem domain. Analyze the relationships between them. The object model, dynamic model and functional model are established, and the process of solving the domain model is established by the object-oriented viewpoint. Its core concepts are objects, classes, inheritance, and messages. The feature of object-oriented programming is the access of Data control code, in which the inheritance and polymorphism of classes are the effective techniques to deal with complex software. The system has been developed by using this method, which has good stability, reusability and maintainability.

References

"1" Baidu Encyclopedia https://baike.baidu.com

"2" Wikipedia https://www.wikipedia.org/

A comparative study of "3" structured methodology and object-oriented methodology in software development

A comparison between structured methods and object-oriented methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.