CPP TEORIJA PDF

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: Garg Dumuro
Country: Dominican Republic
Language: English (Spanish)
Genre: Finance
Published (Last): 5 December 2012
Pages: 293
PDF File Size: 17.18 Mb
ePub File Size: 6.67 Mb
ISBN: 962-1-26977-318-3
Downloads: 64434
Price: Free* [*Free Regsitration Required]
Uploader: Samuzuru

Formats and Editions of Teorija CPP : cestnoprometni predpisi : (za interno uporabo) []

You also hide the implementation details of this type in your implementation file. You were right, if this would be all about object-orientation. Some compilers even initialize newly created integers to a specific value, typically 0 zero. A code frame for this would look like this:. Each of these data structures can be characterized by their structure and their access methods. Within this chapter we will use a very simple pseudo code which you should understand immediately.

Each object is responsible to initialize and destroy itself correctly. The resulting module structure is therefore oriented on the operations rather than the actual data.

You then use these operations by providing explicitly the data to them on which they should operate. Consequently, you have to use a special type ANY which allows to assign data of any type to it. Singly linked lists just provides access methods teorijaa append a new element to their end and to delete the element at the front.

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

Roughly speaking, we can distinguish the following learning curve of someone who learns program:. One could say that the defined operations specify the data to be used.

Object-oriented programming solves some of the problems just mentioned. Every other procedure now contains the special parameter this which just identifies the list in question. The main program directly operates on global data. Our interface definition might then look similar to that below:. The idea of this interface is as follows: Consider the multiple lists example again. Usually, people start learning programming by writing small and simple programs consisting only of one main program.

  BS EN 50164 PDF

Index of /~murkos/Teorija in vaje/LAV/Software_145/KRMILJA/TC/BIN

If you want to use a list within a procedure, say, foo you use the following code frame:. This implies, that the compiler cannot guarantee for type safety. This chapter is a short survey of programming techniques. Consequently, in cases of errors you can narrow your search to those places which are not proven cppp be correct.

Therefore we would like to be able to define a list similar to the definition of an integer. Consequently, your programs get structured by the data rather than operations. With modular programming procedures of a common functionality are ccpp together into separate modules. We will now present an example which we use to present some design concepts. With procedural programming you are able to combine returning sequences of statements into one single place.

Each module can have its own data. The main program coordinates calls to procedures and hands over appropriate data as parameters. What we have shown with the traversing strategy applies to other strategies as well.

This chapter is organized as follows. Suppose you want to program a list in a modular programming language such as C or Modula What we would like to have is a mechanism which allows us to specify on which data type the list should be defined. Integers are declared within a particular scope for example within a procedure.

In contrast to the other techniques, we now have a web of interacting objectseach house-keeping its own state Fig. The overall function of the list is always the same, whether we store apples, numbers, cars or even lists. Structure of a singly linked list.

  AFDX TUTORIAL PDF

The advantage is, that now the compiler takes care of calling initialization cpp termination procedures as appropriate. Consequently, there is no longer the need to explicitly call a creation or termination procedure.

Index of /~murkos/Teorija in vaje/LAV/Software_/KRMILJA/TC/CLASSLIB/SOURCE

We can illustrate this as shown in Fig. Each such object can be uniquely identified by its handle and only those methods are applicable which are defined to operate on this handle. Therefore it would be nice to declare a new list with something like:. You therefore create a new interface description which now includes a definition for a list handle. The following two procedures implement the mentioned access methods append and delete.

Programs use data structures to store data. After teorjia sequence is processed, flow of control proceeds right after the position where the call was made Fig. You hide the information of the implementation in the implementation file.

To enable usage of general procedures or groups of procedures also in other programs, they must be separately available.

For example insertion might be done such that an order over the elements is achieved or not. Several data structures exist, for example lists, trees, arrays, sets, bags or queues to name a few. Once you leave the scope for example the procedure where the integer was defined the integer is lost.

But what, if you need more than one list in one of your programs? As you should all know, this programming techniques provide tremendous disadvantages once the program gets sufficiently large.

The list example implies operations to traverse through the list.