O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

SD & D Types of programming language

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Text Editors and IDEs
Text Editors and IDEs
Carregando em…3
×

Confira estes a seguir

1 de 15 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Quem viu também gostou (20)

Anúncio

Semelhante a SD & D Types of programming language (20)

Mais de Forrester High School (20)

Anúncio

Mais recentes (20)

SD & D Types of programming language

  1. 1. Types of programming language
  2. 2. Types of programming language There are 3 types of programming language: 1.Procedural 2.Declarative 3.Object-Oriented
  3. 3. Procedural languages  In a procedural language, the programmer specifies the sequence of operations to be performed  A procedural program has a clear start point, and end point  Livecode, Python, BASIC and C are examples of procedural programming languages (although LiveCode can also be described as Event Driven)
  4. 4. Procedural languages  Larger programs are broken down into smaller subprograms, known as functions or procedures  Subprograms should have a specific purpose. Using subprograms means a program is modular.  Procedural languages provide the programmer with variable data types such as integers, real numbers and strings
  5. 5. Procedural languages BASIC listing
  6. 6. Procedural languages Python listing
  7. 7. Declarative languages The programmer declares all of the facts and rules at the outset Queries can then be performed on the facts and relationships in order to solve problems Used in medical diagnosis, weather forecasting, financial projection and planning Examples are PROLOG and LISP. Declarative languages are often used in artificial intelligence
  8. 8. Declarative languages Sample PROLOG listing
  9. 9. Object-oriented languages In object-oriented programming (OOP) the language is modelled around objects rather than actions Objects can have attributes and methods A car object can have the attributes: Colour Engine size Number of doors A car object can have the methods: Drive forward Brake Unlock doors
  10. 10. Classes
  11. 11. Classes In OOP we define a class as the blueprint for our objects In our example, car is a class – it is not a specific make or model of car but a blueprint for all cars We use our class to create an instance of an object
  12. 12. Instances
  13. 13. Inheritance Object-oriented programming allows classes to inherit commonly used state and behaviour from other classes
  14. 14. Inheritance
  15. 15. Encapsulation Encapsulation is the principle of placing data (attributes) and functions (methods) into a single component (class) Using encapsulation we can hide much of the functionality and data from parts of the program that don’t need to access it

×