Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Theory I

Similar presentations


Presentation on theme: "Object Oriented Theory I"— Presentation transcript:

1 Object Oriented Theory I
19 Object Oriented Theory I

2 Previously File & Streams Read Write Parsing

3 Overview Programming Methodologies Unstructured Programming
Procedural Programming Modular Programming Properties of Modular Programming Object Oriented Programming Object Oriented Languages Objects

4 Programming Methodologies
Unstructured Programming Procedural Programming Modular Programming Object Oriented Programming

5 Unstructured Programming
The main program consists of statements that directly operates on global data (i.e. data that is always available). Program Main Program Data

6 Procedural Programming
Sequences of statements are combined into one place called a procedure. This can then be invoked as often as needed by the main program. Program Procedure Main Program Procedure

7 Modular Programming Program
Procedures are grouped into modules or libraries. Program Main Program Module2 Procedure2 Procedure3 Module1 Procedure1

8 Properties of Modular Programming
Programs consist of several (sometimes many) interacting parts. Libraries can be re-used. Each module can have its own data, and can manage its own internal state. Each module exists once in a program, and has a single state. Management of the state of a module can become complex.

9 Object Oriented Programming
OO programs consist of a web of interacting objects - each with their own state. Each object is responsible for initialising and destroying itself correctly. This addresses the complexities of modular programming. Objects have other attributes that greatly add to the power of manipulating them.

10 Object Oriented Languages
Pure OO languages Smalltalk Java Impure OO languages C++ PERL Pascal/Delphi Mixed paradigm languages Visual Basic JavaScript

11 Objects The world is full of objects.
OO programming was originally developed for the creation of simulations. Because programs ultimately interact with the real world, many (the vast majority) of programming problems can be solved by mapping program code to “objects” that mirror real world objects.


Download ppt "Object Oriented Theory I"

Similar presentations


Ads by Google