ecosmak.ru

Structural diagram of the use of the software package. Block diagram of the program

In concept program structures (program structure) includes the composition and description of the links of all modules that implement the independent functions of the program and the description of the input and output data carriers, as well as the data involved in the exchange between individual subroutines.

To develop large and complex programs, a programmer needs to master special techniques for obtaining a rational program structure, which provides an almost two-fold reduction in the amount of programming and a multiple reduction in

The subordination of program modules is reflected in the hierarchy scheme. However, the latter does not reflect the order in which they are called or how the program works. The hierarchy diagram may look like the one shown in Fig. 5. It is usually supplemented by the decoding of the functions performed by the modules.

Before drawing up the hierarchy diagram, it is advisable to draw up the external specifications of the program and to draw up the functional descriptions of the program together with the description of the data carrier variables. Particular attention should be paid to the hierarchy of structured data types and their commenting.

The division of the program into subprograms is carried out according to the principle from the general to the particular, more detailed. The process of writing a functional description and drawing up a hierarchy diagram is iterative, and the choice the best option is multicriteria. The dismemberment should provide a convenient order for putting parts into operation.

The hierarchy diagram can be given any topological pattern. Fragments with vertical calls can be converted to calls of the same level by introducing an additional module, which may not perform any useful functions from the point of view of the program algorithm. The function of a new module can only be monitoring, that is, calling other modules in a certain order.

Fragments with horizontal calls at one level can be converted into vertical calls to modules of different levels by introducing additional variables that could not be obtained by decomposition of the functional description into subfunctions. These additional variables are usually integer or boolean and are called flags, semaphores, event keys. Their meaning is usually characterized by the phrase: depending on the next history of actions, perform such and such actions.

During the design process, you need to make several design iterations, each time generating a new hierarchy scheme, and compare these hierarchies according to given criteria to select the best option.

Key - the value of a variable used to validate the authority to access some information or routine.

Flag- a variable whose value indicates that some hardware or software component is in a certain state or that a certain condition is met for it. The flag is used to implement conditional branching and other decision-making processes.

Semaphore - data type special purpose, which is a means of controlling access to a critical resource by cooperating sequential processes.

Only two operations can be performed on a semaphore (not counting creation and cancellation): waiting operation(classes) and alarm operation(liberation). The semaphore accepts an integer value, which cannot be negative. The wait operation decrements the value of the semaphore by one when it can be done without getting a negative value, indicating that a free resource is being used. The signaling operation increments the value of the semaphore by one to release the resource.

Critical resource A resource that is used by no more than one process at a time. When multiple asynchronous processes are required to coordinate their access to a critical resource, controlled access via a semaphore is used.

In this method, the division of a complex system into several subsystems is called " divide and rule» (divide et impera), hierarchical or functional decomposition, etc. In this case, the basic principles are:

a) "divide and conquer";

b) Top-down design - from the general statement of the problem to individual sub-tasks, etc.;

c) the principle of hierarchical ordering, which involves the organization of the constituent parts of the system into hierarchical tree structures with the addition of new details at each level.

Complex design process software begin with a refinement of its structure, i.e., definitions structural components and connections between them. The result of structure refinement can be presented in the form of structural and/or functional diagrams and descriptions (specifications) of components.

Block diagram of the developed software

Structural call a scheme that reflects the composition and interaction in managing the parts of the software being developed. Typically, such schemes are developed for each program of a large package, and the list of programs is determined by analyzing the functions specified in the terms of reference.

The simplest kind of software is a program that can only include subroutines and resource libraries as structural components. The development of the block diagram of the program is usually carried out by the method of step-by-step detailing.

The structural components of a software system or complex can be programs, subsystems, databases, resource libraries, etc.

So the scheme of the software package demonstrates the transfer of control from the dispatcher program to the corresponding program, as shown in Fig. 4.1. The programs of the complex, as a rule, are loosely connected. Therefore, a dispatcher is used to organize their joint work.

Rice. 4.1. An example of a block diagram of a software package.

Structural scheme software system, as a rule, shows the presence of subsystems or other structural components. Unlike a complex, individual parts (subsystems) of a software system intensively exchange data with each other and, possibly, with the main program. The block diagram of the software system, as a rule, does not show this, as can be seen from Fig. 4.2.


Usually it is a multi-level hierarchical scheme of interaction between control subroutines. On initial stage the diagram displays two levels of hierarchy, i.e. shows overall structure programs. However, the same method allows one to obtain block diagrams with big amount levels.


Stepping method implements a top-down approach and is based on the basic structures of structured programming. It involves step by step development of the algorithm, as shown in Figure 4.3. Each step in this case includes the decomposition of the function into subfunctions. So at the first stage, the solution of the task is described, highlighting common subtasks. On the next one, the subtasks are similarly described, while formulating the elements of the next level. Thus, at each step, the functions of the designed software are refined. The process continues until they reach subtasks, algorithms whose solutions are obvious.

In this case, it is necessary, first of all, to detail the control processes, leaving the refinement of operations with data in the end. This is due to the fact that the priority detailing of control processes greatly simplifies the structure of the components of all levels of the hierarchy and makes it possible not to separate the decision-making process from its implementation. Having determined the condition for choosing some alternative, the module that implements it is immediately called.

Functional diagram or data scheme (GOST 19. 701-90) - a diagram of the interaction of software components with a description of information flows, the composition of data in flows and an indication of the files and devices used. To depict these schemes, special designations established by the standard are used.

Functional diagrams are more informative than structural ones. On fig. 4.4 for comparison are functional diagrams of software systems and systems.



b)

Rice. 4.4. Examples of functional diagrams: a - a set of programs, b - a software system.

All components of structural and functional diagrams must be described. With a structured approach, interprogramming interface specifications need to be especially carefully worked out, since the most costly errors depend on them.

Structural design uses three main types of models (diagrams):

1) SADT (Structured Analysis and Design Technique - method structural analysis and design) - models and corresponding functional diagrams;

2) DFD (Data Flow Diagrams) - data flow diagrams;

3) ERD (Entity-Relationship Diagrams) - "entity-relationship" diagrams.

Functional SADT Model displays the functional structure of the object, i.e. the actions it performs and the connections between these actions.

The main component of the model is diagram . On it, all functions and interfaces are presented in the form of blocks and arcs, respectively. The connection point of the arc with the block determines the interface type. Control Information included in the block above. input the information being processed is shown with left side of the block, and result(exit) - with right. Mechanism(person or automated system) that performs the operation is represented by an arc included in the block from below(Fig. 4.5).

The construction of the SADT model begins with the representation of the entire system in the form of the simplest component - one block and arcs depicting an interface with functions outside the system. Then this block is detailed on another diagram using several blocks connected by interface arcs. The new blocks define the main subfunctions of the original function, which, in turn, can be drilled down, and so on. (see figure 4.6).


Rice. 4.6

Data flow diagrams(DFD) are the main means of modeling the functional requirements for the system being designed. With their help, these requirements are presented in the form of hierarchies of functional components (processes) connected by data flows. The main purpose of this representation is to show how each process transforms its inputs into outputs, and to reveal the relationships between these processes.

The main components of data flow diagrams are:

a) external entities;

b) systems and subsystems;

c) processes;

d) data storage devices;

e) data flow.

external entity represents a material object or an individual who is a source or receiver of information. It is depicted as a three-dimensional rectangle with an inscription, as shown in Figure 4.7.

Subsystem(see figure 4.8) or process(Fig. 4.9) are represented by a rectangle with rounded edges. It contains three fields:

a) Numbers;

c) Physical implementation.

Subsystem and process differ in name. The first contains the name of the subsystem, and the second contains the verb that defines what the process does.

Rice. 4.8. STI - State Tax Inspectorate

Data storage is an abstract device for storing information. It is depicted as shown in Fig. 4.10. Its designation begins with the letter D.

Data stream on the diagram is represented by a line ending with an arrow that shows the direction of flow. Each data stream has a name that reflects its content.

An example of a data flow diagram is shown in fig. 4.11.

A more complex data flow diagram is shown in fig. 4.12.

ER diagrams will be discussed later.

In the course project, in addition to the functional diagram, it is necessary to present algorithms for the most complex functions (for example, sorting and searching).

After considering the technical requirements for the software, it becomes possible to refine its structure, i.e. definition of structural components and connections between them. As a result of the development of the structure, a functional diagram and a description of the components will be obtained.

Development of software structure

The structure of the software can be represented as a block diagram with a description of the components.

The block diagram reflects the composition and interaction in managing the parts of the software being developed.

The system consists of three interconnected software modules:

personal account module;

The schedule display module is designed to receive from the user information about the requested schedule and display it or print it.

The complete block diagram of the designed software is shown in Figure 2.1.

Figure 2.1 - Block diagram of the software

A detailed examination of each module allows us to present it in the form of the following elements:

"Enter request parameters" - allows you to specify data for the request.

"Schedule page display" - the formation of a page with the requested data on the screen.

"Formation of electronic documents" - the formation of files with the requested data.

“Sending the schedule” - sending data with changes when changes are made.

Development of a functional diagram

Functional diagram or data diagram (GOST 19.701-90) - a diagram of the interaction of software components with a description of information flows, the composition of data in the flows and an indication of the files and devices used. To depict functional diagrams, special designations established by the standard are used.

Functional diagrams are more informative than structural ones. All components of both structural and functional diagrams must be described. With a structural approach, the specifications of interprogram interfaces are especially carefully worked out, since the number of the most expensive errors depends on the quality of their description. The most expensive are errors found during complex testing, since their elimination may require serious changes to already debugged texts.

Thus, it is also divided into three program modules:

schedule display module;

personal account module;

Functional diagram of the software general view shown in Figure 2.2.

Figure 2.2 - Functional diagram of the software

The information that the information system will operate on is organized in the form of a database created using MySQL tools (Figure 16).

Figure 16 Database schema created using MySQL

Formalization of calculations (calculation algorithms and problem solving)

To obtain output documentation, the input data is converted according to a certain algorithm.

When calculating the installation cost stretch ceiling it is necessary to fill in the form "Cost", which contains 3 fields and data entry: ceiling width, ceiling length, material texture. After filling in these fields, the program requests from the MySQL database, data on the cost of the material with this invoice. The cost is calculated by multiplying the area of ​​​​the ceiling covering by the cost of the material per 1 m 2.

In the "Expenses" form, when you click on the "Remains" button, the program module calculates the amount of material remaining in the warehouse. When filling in two fields in the "Remains" form: the date of receipt of the material, the date of consumption of the material, data is taken from the MySQL database with a query about the amount of material receipt in a given month and the amount of consumption in this month. The rest of the material is calculated by the difference between the receipt and consumption of material for a specific period of time.

Block diagram of the use of the software package (dialog tree)

System menu - is the main form of dialogue in applied data processing systems, containing commands designed to perform specific tasks.

The developed application has an intuitive menu. To work with database tables, the IS "Enterprise Management" module consists of.

After entering the data, it is necessary to give the user the opportunity to print the certificate form and a copy of the client. this operation must be performed without fail. Printing can be done on two types of printers: impact (matrix) and inkjet. Printing help on laser printers is not possible due to increased requirements for paper quality. When printing help on a dot matrix printer, you can print two copies (help + copy) in one pass using carbon paper. An inkjet printer must print each copy separately. Therefore, it is necessary to provide a user-changeable counter for the number of copies or a special setting function for the type of printer.

Fig.2 Scheme of interaction and data links

Development of a functional scheme of the program.

The functional composition of the program should maximally provide the necessary set of capabilities for the cashier to perform his official duties related to data entry, registration of transactions and preparation of reporting documents. To do this, we will compile an approximate list of functions that should be implemented in our system.

Approximate list of system functions.

1) Registration of an exchange transaction

Entering data on the purchase of currency

Entering data on the sale of currency

Entering data on currency conversion

・Print customer reference

2) View documents

· View the list of documents of the day

View a list of archived documents

3) Maintenance of directories

· Data entry by value codes

· Data entry by types of documents

Entering data by currency codes

Entering exchange rates by date

4) Generation of reporting documents

· Printing the register of cash foreign currency purchased for cash rubles;

· Printing the register of cash foreign currency sold for cash rubles;

· Printing the register for the exchange (conversion) of cash foreign currency;

5) Other functions

Entering data in the input field from the directory

Converting a number from digital to lowercase (amount in words)

· Changing the appearance of the cursor

Saving data in archive files

This list covers all the procedures described in section technological process OP and supplemented with some functions that will be needed in the process of data entry and correction.

Development of the block diagram of the program.

The block diagram of the software package defines in general terms and appearance of the designed system and principles of interaction with the user. The scheme of the designed system will be a hierarchical tree structure describing the procedures for input, processing and output of data. The construction of programs of the information and reference class according to this principle makes it quite easy to modify the system as a whole and facilitates the perception and understanding of the principle of the program. To construct a block diagram, it is necessary to determine the hierarchy and connection of the data processing procedures listed above. It is natural to establish a hierarchy of procedures in the form in which they were described in the previous chapter, since such a scheme corresponds to the scheme of "importance" and "usability" of procedures. The block diagram of the program, taking into account all of the above, is shown in Figure 2.

Development of the screen interface of the program

Existing approaches to screen interface design

The screen interface of the program largely determines the convenience of the user and is one of the important factors affecting the efficiency of his work. A program that performs all the functions assigned to it and has high speed may be completely unsuitable for work due to an unacceptable user interface. Just a few years ago, there was a text editor that perfectly illustrated this approach to software design. It is unlikely that anyone will like a text editor in which, to insert a character into a line, you need to type a single-letter insert command code, the number of the line being processed (fortunately not binary), the number of the character after which the new character will be inserted and this character itself. Of course, this approach is completely unacceptable.

The most practical and user-friendly systems are systems that have a screen interface built on the basis of a pop-up menu system. The most common at present are two ideologies (meaning DOS applications), which include both a certain form of on-screen windows and a color scheme and the appearance of pop-up lists. These are Borland's Tool Environments, and Symantec's Norton Operating Shell. Both ideologies provide for a certain division of the screen space into areas or zones intended for specific information objects and actions. Zones can be reconfigured to some extent at the request of the user: the sizes and position on the screen are changed. Data processing commands are called from the menu system, permanently present on the screen (Borland), or called by the function key (Symantec).

In both cases, all system commands are distributed according to their functional characteristics into groups and in the main menu there are

the actual names of the command groups. By selecting a group, the user gets access to the list of group commands, which can also include commands grouped into second-level groups, etc.

Thus, a multi-level pop-up menu system is created. The use of such an ideology ensures the convenience of orientation in a system that has a rather complex, multi-level menu with many choices. Naturally, the increase in the nesting and size of the selection lists should have reasonable limits, which, fortunately, are in the form of a limited screen space of the monitor. In most systems, there is also the ability to customize the color palette at the request of the user. The Norton operating shell offers a choice of gamuts from several standard options, in Borland systems you can create your own color gamut, down to the smallest detail. Approximate view some screen objects are shown in Fig.4,5.

The choice of the ideology of the screen interface

Loading...