Basic software development knowledge

Source: Internet
Author: User

Basic knowledge of Software Development

Han huijian

I. Concept of software

1Software:Is a part of computer systems that is mutually dependent on hardware. It includes a complete set of programs, data, and related documents. Where

Program-a sequence of commands executed in accordance with the previously designed functional and performance requirements

Ø data-the data structure that allows the program to manipulate information normally

Ø document-it is related to program development, maintenance, and use.

2Software classification (by function)

System software: such as operating systems, database management systems, and Device Drivers

Supporting Software: assists users in developing tool software, such as Microsoft Visual Development Platform tools

Application Software: software that serves specific purposes, such as financial management software.

2. Software Engineering and software development

1,Software Engineering

A series of complete engineering principles.

Software Engineering is a series of complete engineering principles established and used to economically obtain reliable software that can run effectively on real machines.

Software Engineering is a system method for developing, operating, maintaining and repairing software.

In 1983, IEEE (Institute of Electrical and Electronics Engineers) defined software engineering as a systematic approach to the development, operation, maintenance, and repair of software. Software is defined as: computer programs, methods, rules, relevant documentation and data required for running on the computer.

The main idea is to emphasize the principle of English engineering in software development.

2,Software lifecycle

According to the software engineering process (Plan, do, check, Action), namely, Software Specification Description, software development, software validation, Software Evolution, further development, the software life cycle includes six stages

(1) Plan

(2) Demand Analysis

(3) Software Design

(4) Programming

(5) Software Testing

(6) operation and maintenance

3,Software Development

The development stage consists of three interrelated steps: Design, Implementation (coding), and test.

Iii. Objectives and main work of each stage

Plan

Management level.

Define the overall goal of the software system to be developed, and provide its functional, performance, reliability, and interface requirements;

Study the feasibility of completing the software task and explore possible solutions to the problem;

Develop implementation plans and feasibility study reports.

Requirement Analysis

Analyze the requirements of software development and define them in detail.

Purpose of Requirement Analysis:

Ø describe the functions and performance of the software in depth, determine the constraints of the software design, and the interface details of the software with other system elements,

The analysis stage only determines what the software system should do ",

"How to do it" is completed in the subsequent design phase. The detailed description of the algorithm is also given in the design phase.

Define other validity requirements for the software.

Requirement Analysis task:

Understanding users' requirements for development systems through cooperation with users;

Determine the logical model of the system based on the investigation and analysis of the information domain where the system is located as required by the user;

Appropriate decomposition of the problem to be solved, making it suitable for computer solutions.

Requirements Analysis:

Data Modeling:

Including3Information, that is, data objects, description object attributes, and description object links.A data flow diagram is used to describe the transformation and flow of the system data flow. A data dictionary is used to define the data flow, data file, processing, and processing in the data flow diagram. A discriminant table is used to indicate the combination of complex conditions and actions.

Function modeling and data flow:

The target system is expressed as "input information-" Target System-"output information", System functions are reflected inCore Data Transformation. The idea of functional modeling is to useAbstract model ConceptBased on the internal data transmission and transformation relationships of the software, the software is decomposed from top to bottom until all the software that can be implemented to meet the functional requirements are found. Function modeling expresses the movement of data and the transformation of data streams.

Behavior Modeling:All requirements analysis methodsOperating Principles. Describes the status of the system or object, events that cause state changes, and thus describes the behavior of the system.

Software Design• The requirement is converted into an architecture that describes each module.

ØThe requirement is converted into an architecture and detailed description of each module.

Software DesignIt is a process of transforming software requirements into software representation. Converts identified requirementsCorresponding architecture,ThenEach moduleWork to be doneDescription.At first, this indicates to describe the overall framework of software that can directly reflect functional, data, and behavioral requirements. Then, we will further refine the framework and fill in the details, it is processed into a software representation that is very similar to the source program in terms of program details.

ØSoftware design is to solveHow to do".

The software analysis phase has completely clarified various software requirements,Software design solves the problem of "how to do it".

ØSoftware design content

Based on the requirements expressed in data, functions, and behavior models in the analysis model, a brief design (data design, architecture design, and interface design) is carried out using the corresponding design methods) and detailed design (process design ).

NSummary design:

Translate software requirementsData structure and software system structure, establish interfaces, establish the architecture framework of the entire system, and provide the global data structure, database interface, and man-machine interface in the system, interfaces with other hardware and software.

In addition, from a global perspective of the system, we also consider the handling method, operation mode, fault tolerance mode, and system maintenance to lay the foundation for the entire system implementation. If there is no outline design, we will directly consider the program design, the structure and quality of the software system cannot be grasped globally, which may lead to unreasonable division of the program structure and instability of the system.At this stage, we should focus on the division of program modules to achieve the needs.(Data design, architecture design, interface design)

Data design:

Converts the objects and relationships in the requirement and the detailed data content described in the data dictionary into the definition of the data structure.

Data design process:

1. Select logical representation for the data objects identified in the requirement analysis stage. algorithm analysis is required for different structures to select the most effective design scheme.

2. Determine the operation modules necessary for the Logical Data Structure to limit or determine the impact scope of each data design decision.

Data design principles:

1. Consider several different data solutions and the impact on future design.

2. determine all data structures and the operations applied on each data structure

3. a data dictionary should be created. It represents the characteristics of data items and control items, and clearly defines various information items.

For example

Passbook = Account name + account date + nature

Account name = 2 {letter} 24 // at least 2 letters, up to 24

The number = ''001 ".." 999 "// The deposit is encoded as three digits

Account Opening Day = year + month + day

Nature = '1'... "6" // 1 indicates a common user, 5 indicates a wage user, and so on

4. Gradually refine the Method for Data design

The design of the underlying data is postponed to the later stage of the design process. The gradually refined method is applied to the data design, that is, the overall data organization is determined in the demand analysis stage, and the outline design stage is refined, the detailed design stage specifies the specific details.

5. The programming language should support the definition and implementation of data types.

Clear information definition is the key to successful software development.

Appendix Data design

In the early stages of computer development, computers were mainly used for numerical computation. They processed numerical data with a small amount of data, simple structure, and uniform form. With the development of computer technology and the expansion of computer application fields, more and more non-numerical data needs to be processed, and the concept of data has been greatly promoted, numbers, characters, images, and sounds all belong to the category of data. Compared with numeric data, the structure of non-numeric data is complicated, and its computer representation is also troublesome.

Only through in-depth research on the internal structure of data and how data is stored and operated in the computer can an efficient and reliable program be designed to effectively process data.

1, Mathematical Model

To solve a practical problem with a computer, we must first abstract an appropriate mathematical model from a specific problem, and use this mathematical model to obtain the exact or approximate solution of the problem. Then determine the calculation method of the mathematical model. According to the specific requirements of the problem, you can select an appropriate algorithm or design a new algorithm among the known algorithms. The next step is to use a programming language to compile a computer program for a specific algorithm, and prepare various data as the program to process objects. Next, we will start program debugging and running. We will test the program with some typical data and data describing the boundary conditions, so as to detect and correct errors in the program, incorrect correction may result in repeated steps. Finally, after the program debugging meets the required quality standards, it can be formally put into operation, and finally solve the problem on the computer.

Establishing a mathematical model of practical problems is the first task that must be done in computer applications. It is also a very important task.

Common mathematical models can be divided into two categories: numerical calculation and non-numerical calculation. Mathematical Abstraction results in many practical problems are mathematical equations. These mathematical equations can be resolved to obtain the exact solution, or the approximate solution can be obtained using a simulated method. However, more practical problems cannot be described by mathematical equations. What these problems ask is not a specific value, but a certain retrieval result, a certain sort of status, or a converted form, A Design Representation ...... The mathematical model of these problems is not a mathematical equation, butData StructureTo describe the relationship between data and data.

2Concept of Data Structure

DataIt is a descriptive form (encoding) of the name, quantity, characteristics, and nature of an objective object. It is a general term for all symbols that can be processed by computers. Data is both a computer processing object and a computer product (computing result ). For example, a program that uses the numerical analysis method to solve the algebraic equation processes integers and real numbers, and a compilation program or a text processing program processes strings. Therefore, for computer science, data has a wide range of meanings. The proportions, images, colors, and sounds can all be encoded into the data category.

Generally, we are not interested in a single isolated data, but focus on the data set composed of many data elements to study the internal relationship between data elements in the collection, what operations are usually required for data and data sets (that is, the processing of data), how to improve the computing efficiency, and so on, this leads to the data structure.

The data structure contains a batch of data, which is a collection of data. Each individual data in this set is calledData ElementIt is the basic unit of data. A data element is also calledData NodeNode.

Data TypeIt refers to the types of variables allowed in the programming language, that is, the set of values that a variable can take and the operations that can be performed. We can regard the data type as a data structure that has been implemented in the programming language.

A data element can be simple and has only one data item, such as a number, a character, and a name. It can also be complex and composed of several data items, A data node is a set of related information used to describe the name, quantity, features, and nature of an independent thing. For example, when designing a program to deal with student achievement problems, each student's data item (domain) forms a data node, which may include the student's name, student ID, score of each subject, etc, student ID can be used as a node keyword. When dealing with inventory goods problems, a data node corresponds to a commodity-related data item, including the commodity number and name, specification, quantity, manufacturer, unit price, and warehouse receiving date, the product ID can be used as a keyword.

Data StructureIt is a collection of data elements with structural characteristics. It studies the logical structure of data, the storage structure of data, and the relationships between them, and the operations that adapt to the definition of this structure, design the corresponding algorithms.

Architecture Design:

-Define the relationship between the main components in the software system.

In fact,Software always has an architecture, There is no software without an architecture. The term architecture stands for "architecture" in English. Software is compared to a building because it has basic, main, and decoration, it is the infrastructure software on the operating system, the main application that implements the computing logic, and the user-friendly interface program. From the details, every program is structured.

ØA structured program is a module composed of statements. The aggregation and nesting of modules form a program structure called layer by layer, that is, the architecture.

There are three main elements:Hierarchical Structure of program components (modules),Interaction Between Components, AndData Structure.

Although the software architecture has been widely used in the software engineering field, so far there is no widely accepted definition. Many experts and scholars have characterized the software architecture from different perspectives and different aspects,

ØOne purpose of software design is to establish an Architecture Representation of the software.

The architecture has gone through a process from low-level to advanced, including data stream systems, call-return systems, independent systems, virtual machines, and so on.We useCThe software structure compiled by language adopts a call-return method.

Solve the module division problem

The software architecture not only specifiesOrganizational structure and TopologyAnd shows the relationship between system requirements and elements that constitute the system, and provides the basic principles of some design decisions.

Interface Design:

――Define the interaction between components in the software, between the software and other collaborative systems, and between the software and users based on the data flow diagram.

NDetailed Design:

That is, process design (also calledProgram Design), Detailed the Structure Representation to obtainDetailed data structureAndAlgorithm. Determine the specific algorithms of each module in the outline design phase.

Program Design (Process Design ):

The structure component is converted into procedural descriptions of the software to generate source code based on procedural descriptions during the coding stage.

Ø programming task: analyze the logical relationship of the algorithms used by the program, design all necessary process details, and clearly express them as the basis for coding.

Program Design is different from coding or programming.The design is neither Code nor Design.

The abstraction level of any design model is higher than that of the source code. The only design decision made in the coding stage isDescribes how to convert process design into small Implementation Details of program code. It is equivalent to Translating Chinese into English accurately.

Program Design determines the implementation algorithms of each module of the software, and accurately expresses these algorithms.

Algorithms of each module involve software functions and algorithm design. precise expression of these algorithms involves Algorithm Description and expression tools.

Iv. Structured Program Design

In order to effectively design programs, we should not only master a programming language, but also learn to develop effective solutions and steps for various problems-algorithm design. With the correct algorithm, you can compile the program. The quality of an algorithm determines the merits of a program. Therefore, one of the core tasks of programming is to design an algorithm.

(1)What is an algorithm?

1Computing-the soul of a program

In a broad sense, an algorithm is a precise and unambiguous description of the rules that should be followed in one step to complete a task. Its total number of steps is limited.

In a narrow sense, algorithms are the methods and steps used to solve a problem.

To put it simply, algorithms are the solution to the problem and a detailed description of the specific steps for solving the problem. The so-called computer execution means that an algorithm can be constantly refined and can be expressed by the commands that the computer can recognize and then executed. Therefore, from the perspective of computer applications, algorithms are a set of commands used to solve a specific problem. Specifically, we use the operations or commands that computers can implement to describe the problem solving process. (encoding) we get the computer algorithm for this particular problem.

The algorithm solves the problems of "what to do" and "how to do ".

Algorithm is the soul, data structure is the processing object, and language is the tool

Ø Computer Algorithm Design: design detailed steps for a computer to solve specific problems, and describe all the problem solving processes with a certain computer tool.

With different application problem solving objectives and different basic ideas for solving specific application problems, the idea of algorithm design is also different, that is, the basic method of algorithm design is different.

Ø classification of algorithms: Numerical Algorithms and non-numerical algorithms

Numerical Algorithms solve numerical computing problems, including solving equations and equations, and calculating differential points;

Non-numerical algorithms solve information scheduling and management problems in computer or daily life, including information organization and management and information optimization.

Program = Algorithm + Data Structure

Algorithms are crucial when we use computers to solve various problems. Without algorithms or computer algorithms, we have no way to solve the problem.

Computer solutions depend not only on algorithms, but also on a large amount of data. Data Organization and storage directly affect algorithm implementation and efficiency.

When dealing with complex problems, people always use abstract thinking tools. Abstract refers to grasping the essence of the problem, while ignoring the secondary part of the problem. Pay attention to the universal laws of things or common things.

Algorithms and data structures are two types of abstraction that people use computers to solve problems: algorithms are the abstraction of the problem-solving process from the perspective of computer operations; data structures are abstracted from the perspective of how to organize and process operation objects. These two abstractions are mutually dependent and complementary, minimizing the complexity of the problem.

Based on these two aspects, people develop various applications with high running efficiency. Therefore, in a fixed sense, people think that: program = Algorithm + Data Structure

Program Design = Algorithm + Data Structure + programming method + programming and development tools

In addition to algorithms and data structures, programming methods are also important to programming. They affect the success or failure of programming and the quality of programming. As the computer solves more and more complex problems, the computing speed of the computer itself is getting faster and faster, and the memory capacity is getting bigger and bigger, program design is no longer a "handicraft" of the programmer's personal skills ". Program Design should follow certain development methods and ideas, such as structural design methods, modular program design methods, top-down gradually refined methods, object-oriented programming methods, etc, software development should be carried out in accordance with engineering management methods, that is, software development should be carried out using software engineering ideas and methods. So it can be further said: Program Design = Algorithm + Data Structure + program design method + program design and development tools

(2) Why do programs need to be controlled?

Ø there are very clear expectations and the preparation steps in sequence

In our daily life, if we have a very clear expectation for the handling of the entire incident without any unexpected occurrence, we do not need any judgment. We can divide it into several steps to achieve the goal in sequence.

Ø if there are no definite targets, we need to provide judgment conditions to control the computer to execute the determined tasks, which is why the computer has a branch.

If there is no definite goal, we may make a judgment on the next action, such as taking a bus to the railway station, not knowing where the bus is, and failing to find it at an intersection, it will be found at another intersection.

When a computer is dealing with complex and changing problems, it cannot determine the situation and modify its own behavior by itself. It is just a rigorous design based on personnel, this is why the computer has a branch. The Branch is that programmers need to estimate the possibility of occurrence in advance, and let the program have the next kind of direction and choice, requiring programmers to learn things as God rather than program as God, so programmers need rigorous quality.

Computers are good at logical reasoning and computation. Many of our problems need to be solved by repetitive work, which is boring and a waste of time, computers can free people from heavy mental work at an extremely high speed.

Whether you choose to run the program or run it repeatedly, you must design the program to determine and control the program steps,

Prior to the structured design method, the shift of the control flow was arbitrary and represented by a traditional flowchart (P23, Figure 2.13 ).

In programming languages, the GOTO statement is used to implement the control path,

Arbitrary redirection makes the Goto statements widely used, and the program path is complex and chaotic, making it difficult to understand the logic of the algorithm.

In order to eliminate unsuitable goto statements from the control structure of the program.

In 1965, E. W. Dijkstra proposed at a meeting that the GOTO statement should be removed from the advanced language,

In 1966, Bohra and jacpini proved that any program with a single entry and a single exit without an endless loop can be constructed by three basic control structures. The three basic structures are (1) ordered structure (2) selected structure (including single selection if... Else type and multi-Choice case type) (3) duplicate structure (including when type while .. do type and do type till type .. while type), the program that uses these three control structures is called a structured program.

(3) Algorithm Description

Graphical tools, table tools, and language tools

Graphical tools include program flowchart, NS diagram, pad diagram, and hipo diagram (hierarchy plus input process output ).

Ø table tool: Table Determination

Language tools: PDL (Program Design Language) pseudo code, natural language

1. program flowchart

The program flowchart describes the control flow in the program, that is, the execution sequence of processing (Instructions) in the program and the conditions on which the execution sequence depends. A directed line segment (streamline) indicates the control flow, from one process to another.

The program flowchart is suitable for programming in assembly languages.

Flowcharts describe unstructured programs (traditional program flowcharts)

The flowchart is intuitive, clear, and easy to learn independently of the programming language. However, it also has some disadvantages, indicating that the arrows of the program control process can be transferred without any restrictions.

Symbols in the flowchart (see slides)

Flowchart description structured program (structured program flowchart)

To allow flowcharts to describe structured programs, only the following five control structures are used. See slides. For example, select the maximum number from 10. For details, see slides.

2. N-S diagram (box chart)

American scholars nassi and shneiderman proposed that the structure can be found in the slide chart. For example, select the maximum number from 10. For details, see the slides.

3. Code Representation

Pseudo-code represents an algorithm by text and symbols between natural and computer languages. For example, write down the same article from top to bottom. Each line or line represents a basic operation. Use pseudocode

Graphical symbols are not required. Generally, keywords in computer languages can be expressed in English. Other words can be expressed in Chinese or English. In short, it is easy to write and read, writing algorithms with pseudocode generally has no fixed strict syntax requirements. As long as the meaning is clearly expressed, this is a common method. After learning the C language, you can give a rough description according to the syntax rules of the C language, then, we will gradually refine the description. After a long time, we will be able to train ourselves to achieve the "thinking in C" thinking ability.

4. Computer Language representation algorithms

That is, programming (encoding) is not the scope of "design", but the implementation stage. It must strictly follow the syntax rules of the computer language in use, for example, to write a program in C language, follow the syntax rules of C language. These rules are exactly the content of this course.

Summary of algorithm description methods (see slides)

(4) Structured Program Design

1Structured Program design mainly includes two aspects:

(1) When writing a program, emphasize the use of several basic control structures and form the control structure of the program by combining nesting. Avoid using the GOTO statement whenever possible.

(2) In the process of program design, we should try to adopt the principle of top-down and gradual refinement, from coarse to fine, step by step.

In the detailed design and coding stage, the top-down and progressive refinement methods should be adopted to gradually decompose the functions of a module into a series of specific steps, then it is translated into a series of programs written in programming languages.

Understanding of the principle of "top-down and gradual refinement, from rough to fine, step by step"

For the description of the Program (whether it is a non-formal "program" in the previous examples of daily life, or

Hope the computer executes the Program), there are several important issues worth mentioning:

What are the basic "commands" that can be written in a program? Washing your face and searching the bibliography are the "procedures" in daily life"

. When writing a program that needs to be executed by a computer, the basic action should be completed by the computer.

Items. For example, to write a program in the format of binary code, you must follow the rules of the specific computer command system.

Write a command. When writing a program in an advanced language, it must also be based on the basic functions supported by the Language (

This command ). One of the most basic aspects of learning to write programs in advanced languages is to understand the basic functions provided by languages,

Measure the test taker's knowledge about their descriptions and the effect of the operations.

What are the requirements for the language used to describe the program? When describing the previous "program" related to daily life,

It is our "Natural Language" for interpersonal communication ". Rich Natural Language Vocabulary, strong expression ability. However

In many cases, it depends on the knowledge and knowledge of the recipient. If Confucius was asked to go to the library to borrow books according to the previous procedures, he could not understand the actions in the library, nor could he perform it to borrow books. Natural Language descriptions are often inaccurate, and many

Omissions must be filled by the recipient's knowledge. This situation can greatly improve the efficiency of information transmission, but it also brings

The possibility of misunderstanding. The program sent to the computer must be in the form of a log that can be processed by the computer, and its description tool (Language

It must be accurate and unambiguous. All programming languages must meet these requirements.

A program may be described at different levels. Let's take a look at examples of brushing your teeth. You can use only one word to describe this action. But if you think about it, brushing your teeth is also a complicated process. For example, we can further describe it to take a cup, water, take a toothbrush, squeeze toothpaste, gargle, brush teeth, clean teeth and a series of detailed actions. In addition, each action on this layer can be further divided into a series of muscle scaling actions.

The details of the program should be broken down to which layer,On the one hand, it depends on the basic functions provided by the program language..In addition, the way the program is described also takes care of human needs.Complex programs may require thousands or even millions of lines of advanced language code. Simply describing a program on the basic level of a high-level language also seems to have a low level, making it hard to grasp the meaning of the program, making it hard to ensure that it can implement the expected functions, it is difficult to modify programs to meet new needs. Therefore, when developing complex programs, we need to provide a higher Description Level to describe the functions of the program at each level. Just as we see a very long series of descriptions about muscle scaling, it's hard to understand what we're doing here is brushing our teeth. As the program becomes more complex, its organizational structure becomes more important.

Let's use an example in our daily life to illustrate the problem. For activities that students get up in the morning

The description on the hierarchy is as shown in the previous section:

1. Get up;

2. Brush your teeth;

3. Wash your face;

4. Dinner;

5. Early self-study;

In this way, a complex program is decomposed into several relatively simple parts. If further refinement is required, we will go down to the next level of detail and break down a high-level action into a series of basic actions at the lower level. For example, the "eat breakfast" high-level action may be divided into the following action sequence:

Get up early

Get up

Breakfast

Face washing

Brush teeth

Early read

Take rice bowl;

Go to the canteen;

Queuing for food;

Dinner;

Fl bowl;

Leave the canteen;

Further decomposition is required. For example, the "queuing for food" is divided into "queuing, meal selection, food selection, and payment. In this decomposition description process, we should also retain the level of abstract description constructed above. This hierarchy not only helps people understand the detailed process of the program, but also helps to discover errors in the program and make the obtained program easy to modify as needed. For example, the school canteen is changed to a fast food meal, because the whole program is divided into some logically independent parts, it is easier to modify it.

This method of work is exactly what needs to be mastered during programming. Starting from the requirements of the problem

Design programs and gradually break down program functions. After breaking down the functions required by the program to a certain degree of detail, you can

The detailed steps in the program work are described by the structure of the program language. This book will continue to discuss this issue. In

When learning program design, you must also learn the correct methods for analyzing and constructing programs.

For details about specific computer programs, see the slides.

2Main Principles of Structured Program Design

N represents the program logic using a limited basic control structure, such as sequence, selection, and repetition in the language.

The control structure selected by N only allows one entry and one exit.

N program statements constitute a easily identifiable block, each with only one entry and one exit.

N complex structures should be implemented using the basic control structure for composite nesting.

The control structure not in the N language can be simulated by an equivalent program segment, but it must be consistent throughout the system.

N strictly controls the GOTO statement and can only be used in the following scenarios:
① Use an unstructured programming language to construct a structured structure.
② If the GOTO statement is not used, the program function will be blurred.
③ When the program readability can be improved rather than impaired

V. Principles of Software Design

1 Abstraction

Different abstraction layers can be created during module design.

(1) process Abstraction

From system definition to implementation, every step of progress can be seen as a refinement of the abstract process of software solutions. In the software requirement analysis stage, "The problem environment is familiar to everyone" describes the software solution, and then gradually reduces the abstraction level to the Outline Design, detailed design, and so on.

(2) Data abstraction

Similar to process abstraction, you can describe details of data objects at different levels.

(3) control Abstraction

The control abstraction can containProgram Control MechanismYou do not need to specify internal details, such as using synchronous signals in the operating system to coordinate certain activities.

2. From top to bottom, Gradually refine

This is the design strategy proposed by Niklaus Wirth. The software architecture is scaled down from top to bottom, and process details and data details at various layers are refined layer by layer, until the statement in the programming language can be implemented.

3. Modular

The hierarchy of software systems is a concrete embodiment of modularization. That is to say, the entire software is divided into several separately named and addressable parts and becomes a module.

For a big problem, it is generally complicated to break it down into small independent problems that are easy to handle. However, when the number of modules increases, the relationship between modules increases. The workload for connecting modules increases, and you need to find a balance.

4. control level (program structure)

It is usually represented by the program hierarchy. The top-level module is the main module, and the lower part is the subordinate module.

Depth of program structure: The number of layers of the program structure, reflecting the scale and complexity of the program structure

Program structure width: Maximum number of modules at the same Layer

Fan In and Out of modules: Fan-out refers to the number of other modules that a module calls directly. Fan-In refers to a given module that has modules to call it. A multi-Fan-in module is generally designed as a public module.

5. Structure Division

The program structure can be divided horizontally or vertically.

Horizontally divide the branches of the module structure according to the main program functions.Top-level module(M) as a control module, the communication and operation between the following functional modules are controlled and coordinated. The simple functional division of lower-level modules (A, B, and C) is: input-> processing (data transformation)-> output.

6. Data Structure

The data structure is a representation of the logical relationship between data. The data structure design should determine the data organization, access method, and different information processing methods. The organization and complexity of data structures are flexible and diverse, but the typical types of data structures are limited. They constitute the basic components of more complex structures.

(1) scalar: the simplest data structure. A scalar item is a single data element that contains a Boolean, integer, real number, or string. You can store them by name.

(2) ordered vector (one-dimensional array): Several scalar items are organized into a table or joined into a group, which can be expanded to two-dimensional, three-dimensional, four-dimensional ..... N-dimensional

(3) linked list: a more flexible data structure that links physically non-adjacent scalar items, vectors, or spatial structures with pointers.

(4) combined data structure: the above scalar items, vectors or n-dimensional space can be used to construct structure data, or various data structures can be used to create a layered structure and network structure with multiple linked lists.

7. Software Process

It is the detailed design process in the module,

The program structure describes the control hierarchies of the program and the interface of each part. The details of each module are described here.

It is also hierarchical.

8. Information Hiding

How can we break down a software to get the best combination of modules ,? Information Hiding is required. The implementation details of each module are hidden from other modules. Therefore, effective modularization is achieved through independent modules, that is, there is not much link between the functions of the modules on the data. The criteria for measuring independence are the coupling and cohesion between modules.

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.