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.

Author: Vikus Kaziramar
Country: Philippines
Language: English (Spanish)
Genre: Love
Published (Last): 16 August 2008
Pages: 332
PDF File Size: 15.75 Mb
ePub File Size: 17.20 Mb
ISBN: 399-4-41033-541-8
Downloads: 55740
Price: Free* [*Free Regsitration Required]
Uploader: Nikomi

We will now present an example which we use to present some design concepts. The calls to provided procedures remain the same. Consider the multiple lists example again. Fortunately, it is not. Therefore it would be nice to declare a new list with something like:. This chapter is a short survey of programming techniques. The list example implies operations to teorika through the list.

For example, if a procedure is correct, every time it is used it produces correct results. You hide information of the actual implementation information hiding. Thus, it is exactly the other way around: The following two procedures implement the mentioned access methods append and delete.

Even worse, sometimes traversing strategies depend on the particular context in which a data structure is used. Then you use the procedures feorija the module to modify each of your handles. What we have shown with the traversing strategy applies to other strategies as well. For a teeorija data structure like the singly linked list one can think of only one traversing strategy. You decide to redesign your list module to be able to manage more than one list. Object-oriented programming teoorija some of the problems just mentioned.


Consequently, your programs get structured by the data rather than operations. It is in your responsibility to ensure that your list is used consistently.

Your interface definition file of your new list module looks like this:. Programs use data structures to store data.

Traversing can be done using the following loop:. You hide the information of the implementation in the implementation file. You choose the data representations which best fit your cpo. The main program is responsible to pass data to the individual calls, the data is processed by the procedures and, once the program has finished, the resulting data is presented.

Index of /~murkos/Teorija in vaje/LAV/Software_145/KRMILJA/PIC/HT-C/BIN

With procedural programming you are able to combine returning sequences of statements into one single place. Roughly speaking, we can distinguish the following learning curve of someone who learns program:.

Singly linked lists just provides access methods to append a new element to their end and to delete the element at the front. Several data structures exist, for example lists, trees, arrays, sets, bags or queues to name a few.

Therefore we would like to be able to define a list similar to the definition of an integer. Each of these data structures can be characterized by their structure and their access methods.


Teorijja the sequence is processed, flow of control proceeds right after the position where the call was made Fig. Structure of a singly linked list. Consequently, it makes sense to separate the actual representation or shape of the data structure from its traversing strategy. You then use these operations by providing explicitly the data to them on which they should operate. But what, if you need more than one list in one of your programs?


A program therefore no longer consists of only one single part.

A possible solution is to additionally add information about the type to each list element. This has lead to the idea to extract these sequencesname them and offering a technique to call and return from these procedures. We do not specify, how this handle is actually represented teoroja even implemented.

Index of /~murkos/Teorija in vaje/LAV/Software_/KRMILJA/PIC/HT-C/BIN

In our list example we have to use the special type ANY to allow the list to carry any data we like. A procedure call is used to invoke the procedure. To enable usage of general procedures or groups of procedures also in other programs, they must be separately available.

Once you’ve defined them, you can use them. For that reason, modular programming allows grouping of procedures into modules. Now we have a single program which is divided into small pieces called procedures. It is automatically created and destroyed. Roughly speaking, each object implements its own module allowing for example many lists to coexist. You were right, if this would be all about object-orientation.

Instead of calling a procedure which we must provide with the correct list handle, we would directly send a message to the list object in question. This implies a traversing strategy which defines the order in which the elements of the data structure are to be visited.