Docsity

Programming Paradigms: Exploring the Foundations of Software Development, Study notes of Programming Languages

Toggle sidebar
bg1
Session Two: Programming paradigms
2.1 Session Objectives
By the end of this session, you should be able to:
• Explain the concept of programming paradigms
• Identify the typical four programming paradigms
• Explain the paradigms
2.2 Programming Paradigms/Techniques
The term programming paradigm refers to a style of programming.
There exist several programming languages but all of them need to follow some
strategy when they are implemented.
• Structured programming
• Unstructured programming
• Object-oriented programming
• Event-driven programming
• Web script programming
• Logic Programming
2.2.1 Structured programming:
Large routines are broken down into small modules then debug and test them, then integrated to
form a system.
pf3
pf4
pf5
pf8

Partial preview of the text

Download Programming Paradigms: Exploring the Foundations of Software Development and more Study notes Programming Languages in PDF only on Docsity!

Session Two: Programming paradigms

2.1 Session Objectives

By the end of this session, you should be able to:

  • Explain the concept of programming paradigms
  • Identify the typical four programming paradigms
  • Explain the paradigms

2.2 Programming Paradigms/Techniques

The term programming paradigm refers to a style of programming.

There exist several programming languages but all of them need to follow some

strategy when they are implemented.

  • Structured programming
  • Unstructured programming
  • Object-oriented programming
  • Event-driven programming
  • Web script programming
  • Logic Programming

2.2.1 Structured programming:

Large routines are broken down into small modules then debug and test them, then integrated to form a system.

The programming paradigm aims at improving:-

Object-oriented programming has four basic concepts.  Object  Abstraction  inheritance  polymorphism.

2.2.4 Event-driven programming

It involves writing codes that responds to certain events. Events can be:- a. Mouse events -Double click

  • Right click -Left click -Drag and drop

Object A Object B

Communication

DATA

FUNCTION

DATA

FUNCTION

Object

FUNCTION

DATA

b. Keyboard events -Key down -Key up -Key press

• C#

  • Delphi programming languages

2.2.5 Web script

Scripting languages came about largely because of the development of the Internet as a communications tool.

They are used to develop web sites (internet pages).

Examples:

  • JavaScript
  • ASP JSP
  • PHP
  • Perl
  • Tcl
  • HTML (hypertext markup language)
  • Python

2.2.6 Logic Programming They are used to develop expert system. Logic programming allows a program to model a problem by declaring what outcome the program should accomplish, rather than how it should be accomplished.

Sometimes called rule-based languages, since the program’s declarations look more like a set of rules, or constraints on the problem, rather than a sequence of commands to be carried out.

2.0 Session Summary

A programming paradigm is a pattern of problem solving thought that underlies a particular genre of programs and languages. Four distinct and fundamental programming paradigms have evolved

over the last three decades: Structured programming, Unstructured programming, Object-oriented programming, Event-driven programming, Web script programming, Logic Programming

2.1 Student Activity

a) What is a program paradigm?

b) Discuss the categories of programming paradigm.

2.2 Further Readings/References

i. Kernighan, B. W., & Ritchie, D. M. (2014). The C programming language (2nd ed.).

Upper Saddle River, NJ: Prentice-Hall PTR. ISBN: 0131103628.

ii. Perry, G. R., & Miller, D. (2013). Absolute beginner's guide to C Programming (3rd

ed.). Indianapolis, Indiana: Que Publishing. ISBN: 0789751984.

iii. Graham, D. L. (2016). C programming language: a step-by-step beginner's guide

to learn C programming in 7 days. NY, USA: CreateSpace Independent Publishing

Platform. ISBN: 1534679707.