Analysis on the application of structured method and object-oriented method

Source: Internet
Author: User

I. Structured approach

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.

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.

II. Structured design in programming

Starting from freshman, the programming language we contacted first was related to structured design, and a structured program was a structured algorithm expressed in high-level language. A program consisting of three basic structures is necessarily a structured procedure that is easy to write, easy to read, easy to modify and maintain. The basic idea of the structured programming method is that the solution process of a complex problem is carried out in stages, and the problems of each stage are controlled in the scope of people's easy comprehension and processing, so that the code logic is clearer and more normative in the aspect of language design. The structured program focuses on two points:

A) from top to bottom:

Top-down, gradual refinement of the advantages of the method: thoughtful, structured, clear hierarchy, the author is easy to write, readers easy to read. If it is found that a part of the content is inappropriate, need to modify, just to find out that the section to modify the relevant paragraphs, and other parts unrelated.

b) Module Design:

The idea of modular design is actually a kind of "divide and conquer" thought, divides a big task into several subtasks, each sub-task is relatively simple.

After getting a program module, according to the function of the program module divided it into several sub-modules, if the size of these sub-modules is too large, but also can be divided into smaller modules. This process is implemented using a top-down approach. When dividing sub-modules should pay attention to the independence of the module, that is: to make a module to complete a function, the less coupling the better.

Iii. Object-oriented approach

The object-oriented approach (Object-oriented method) is a methodology based on the concept of "object", which applies the object-oriented idea to the software development process and directs the development activities of the system method, or the OO (object-oriented) method. An object is a package of data and allowable operations that directly correspond to an objective entity, and an object class defines a set of objects with similar properties. Each inheritance is a way to share the properties and operations of classes that have hierarchical relationships. The so-called object-oriented is based on object concept, Object-centered, class and inheritance as the construction mechanism, to recognize, understand, depict the objective world and design, build the corresponding software system.

Four, object-oriented programming application

In the sophomore contact with the Java programming language, understand the object-oriented thinking method, the difference and the process-oriented "first function after the data" idea, object-oriented program design method of State (data) and behavior (function) bundled together to form an object. When encountering a specific problem, we only need to decompose a system into one object, and encapsulate the state and behavior in the object.

Object-oriented programming makes people's programming closer to the real world, and all objects are endowed with properties and methods, and programming is more humane. The main advantages are as follows:

(1) In line with people's habit of thinking methods, easy to decompose large-scale complex and changeable problems. Because objects correspond to transactions in the real world, it is natural to handle objects in the real world, and software developers can easily communicate and communicate with the problem-seekers.

(2) Easy to maintain the software and increase or decrease the function. The encapsulation of objects and the loose combination of objects have brought convenience to the software modification and maintenance.

(3) reusability is good. Repeated use of a class, can be relatively easy to construct a software system, coupled with the way of inheritance, greatly improving the efficiency of software development.

(4) The work interface is improved by combining with visualization technology. With the popularity of the operating system based on the graphical interface, the object-oriented program design method will be deeply rooted. It integrates with the visualization technology to make the man-machine interface Enter the GUI era.

V. Summary

Both methods have advantages and disadvantages, in the face of small-scale engineering and high security requirements when the use of structured methods to analyze the difficulty of reducing the problem. However, it is more reasonable to use object-oriented approach in the face of large-scale engineering requiring high maintenance requirements.

Analysis on the application of structured method and object-oriented method

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.