Beruflich Dokumente
Kultur Dokumente
1. Procedural Programming Style of Programming in which the programming task is broken down into a series of operations (called procedures) applied to data (or data structures)
C and Pascal
2. Object-Oriented Programming
Breaks down a programing task into a series of interactions among different entities or objects
OBJECT ORIENTED
PROGRAMMING
Type of programming in which programmers define not only the data stuctures, but also the types of operations (methods) that can be applied to the data stuctures.
Enables programmers to create modules that do not need to be changed when a new type of object is added.
ILLUSTRATION OF OOP
OBJECT ORIENTED
PROGRAMMING
Advantages of OOP over Conventional Approaches: it provides a clear modular structure for programs which makes it good for defining abstract data types where implementation details are hidden and the unit has a clearly defined interface.
it makes it easy to maintain and modify existing code as new objects can be created with small differences from existing ones.
it provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
OBJECT ORIENTED
PROGRAMMING
Represent things from the real world Made up of Attributes characteristics that define an object Methods self-contained block of program code similar to procedure
Example: A cars attributes are make, model, year, & purchase price
Classes
Term that describes a group or collection of objects with common properties Define a type of object
Example: Employee
Car
ABSTRACTION
Allows a programmer to hide all but the relevant information (to the problem at hand) about an object in order to reduce complexity and increase efficiency
ENCAPSULATION
refers to the hiding of data (attributes) and methods within an object
hides the details of an objects internal implementation from the users of an object
ILLUSTRATION OF ENCAPSULATION
INHERITANCE
the process by which objects can acquire (inherit) the properties of an ojects of other class
Provides
reusability, like adding additional features to an existing class without modfying it.
INHERITANCE
POLYMORPHISM
refers to the ability to process objects differently depending on their data type or class
request for an operation can be made without knowing which specific method should be invoked
POLYMORPHISM
ABSTRACT CLASSES
Class
design concept in program development and provides a base upon which other classes are built.
can only specify members that shoukd be implemented by all inheriting classes
INTERFACES
Allow
specify methods that a component must implement without actually specifying how the method is implemented