Teorija CPP: cestnoprometni predpisi: C, E, D – kat.: (za interno uporabo). Front Cover. Bojan Krajnc. B. Krajnc, – 89 pages. Index of /~slmurko/Teorija in vaje/ROM/Interaktivni raèunalniški teèaji/computing/ cpp. [ICO], Name · Last modified · Size · Description. [DIR], Parent Directory, -. Parent Directory, -. [TXT], BARCHART.C, Feb , K. [TXT], , Feb , K. [ ], , Feb , K.
|Published (Last):||23 October 2006|
|PDF File Size:||16.22 Mb|
|ePub File Size:||14.32 Mb|
|Price:||Free* [*Free Regsitration Required]|
One could say that the defined operations specify the data to be used. The corresponding list routines should then automatically georija the correct data types. Typically, this requires to write two files: The lifetime of a list is also defined by its scope, hence, it must be created once the scope is entered and destroyed once it is left.
Index of /~murkos/Teorija in vaje/LAV/Software_145/KRMILJA/TC/BIN
For example you might want to release allocated memory. With modular programming procedures of a common functionality are grouped together into separate modules.
Therefore it would be nice to declare a new list with something like:. Programs use data structures to store data. Roughly speaking, each object implements its own module allowing for example teodija lists to coexist. But what, if you need more than one list in one of your programs?
Index of /~murkos/Teorija in vaje/LAV/Software_145/KRMILJA/TC/CLASSLIB/SOURCE
You all know singly linked lists which use a very simple structure, consisting of elements which are strung together, as shown in Fig. This enables you to change the implementationfor example to use a faster but more memory consuming algorithm for storing elements without the need to change other cop of your program: You hide information of the actual implementation teorjia hiding. Fortunately, it is not. This implies a traversing strategy which defines the order in which the elements of the data structure are to be visited.
Ciklopropan — Википедија, слободна енциклопедија
Now modules group data representations together. For example, if a procedure is correct, every time it is used it produces correct results. Decoupling of data and operations leads usually to a structure based on the operations rather than the data: In our list example we have to use the special type ANY to allow the list to carry any data we like.
Integers are declared within a particular scope for example within a procedure. In object-orientation, structure is organized by the data. Every other procedure now contains the special parameter this which just identifies the list in question. However, more complex data structures such as trees can be traversed using different strategies.
2 A Survey of Programming Techniques
Each of these data structures can be characterized by their structure and their access methods. It is automatically created and destroyed. Then you use the procedures of the module to modify tsorija of your handles. Structure of a singly linked list. This handle is used in every provided procedure to uniquely identify the list in question. On creation time a list should be initialized to be empty. Each such object can be uniquely identified by its handle and only those methods are applicable which are defined to operate on this handle.
You choose the data representations which best fit your requirements. In contrast to that, in object-oriented programming we would have as many list objects as needed.
You hide the information of the implementation in the implementation file. Suppose you want to program a list in teofija modular programming language teoroja as C or Modula For example, this ensures that the list is correctly deleted, returning resources to the program.
For example, if the same statement sequence is needed at different locations within the program, the sequence must be copied. The following two procedures implement the mentioned access methods append and delete. We will now present an example which we use to present some design concepts.
You then use these operations by providing explicitly the data to them on which they should operate. Roughly speaking, we can distinguish the following learning curve of someone who learns program:.
As you believe teorijja lists are a common data structure, you decide to implement it in a separate module.
For that reason, modular programming allows grouping of procedures into modules. Consequently, in cases of errors you can narrow your search to those places which are not proven to be correct. Consequently, there is no longer the need to explicitly call a creation or termination procedure.
You also hide the implementation details of this type in your implementation file. Thus, it is exactly the other way around: