You are on page 1of 24

CHAPTER 1

INTRODUCTION TO PROGRAMMING LANGUAGE

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

FP 101 PROGRAMMING PRINCIPLES

Course Learning Outcome (CLO):


FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Upon completion of this course, students should be able to: 1) Explain the basic computer and programming fundamentals with appropriate examples of language and technology.

SPECIFIC OUTCOME
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

1.1 1.2 1.3

Understand the computer fundamentals. Discuss the evolution of programming language. Explain fundamentals of programming language.

1.1 Understand The Computer Fundamentals

COMPUTER SYSTEM
include the computer along with any software and peripheral devices that are necessary to make the computer function
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

A system of interconnected computers that share a central storage system and various peripheral devices such as a printers, scanners, or routers. Each computer connected to the system can operate independently, but has the ability to communicate with other external devices and computers.

SOFTWARE COMPONENTS
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

OPERATING SYSTEM (OS)


a software program that enables the computer hardware to communicate and operate with the application. Types: GUI Multi-user Multiprocessing Multitasking Multithreading

APPLICATION
a sequence of instructions written to perform a specified task for a computer A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions

Windows Vista, XP, Linux, Unix, Macintosh (OS)


FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Types of OS
GUI (graphical user interface )
Multi-user
allows concurrent access by multiple users of a computer
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

allows users to interact with electronic devices with images rather than text commands.

Multiprocessing
use of two or more central processing units (CPUs) within a single computer system

Multitasking
method where multiple tasks (processes), share common processing resources such as a CPU

Multithreading
provides a way to have more than one thread executing in the same process

Application

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

1.2 Discuss The Evolution Of Programming Language

HISTORY OF PROGRAMMING LANGUAGE


The languages were Codes FORTRAN, LISP, COBOL
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Before1940

The 1940s Plankalkl , ENIAC coding system

The 1950s and 1960s

The 1990s : Internet age Haskell, Python, Visual Basic, Ruby, Lua, CLOS, Java, Delphi, JavaScript, PHP, Rebol, D

The 1980s C++, Objecyive-C, Ada,Common Lisp, Eiffel, Erlang, Perl, Tcl, FL

1967 1978 Logo, B, Pascal, Forth, C, Smalltalk, Prolog, ML, Scheme, SQL

Current trend C#, Visual Basic . NET, F#, Scala, Factor, Windows Poer shell, Clojure, Groovy, Go

11

TECHNOLOGY OF PROGRAMMING LANGUAGE


Machine Languages Using Vacuum Tubes Assembly Languages Using Transistors 3rd Generation Languages Using Integrated Circuits 4th Generation Languages Using Microprocessors
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

5th Generation Languages Using Artificial Intelligence

12

MACHINE LANGUAGES
only languages understood by computers
Also called machine code A set of instructions for a specific central processing unit, designed to be usable by a computer without being translated impossible for humans to use because they consist entirely of numbers The lowest-level programming language sometimes called native code when referring to platform-dependent parts of language features or libraries Every CPU has its own unique machine language. Programs must be rewritten or recompiled, therefore, to run on different types of computers
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

13

ASSEMBLY LANGUAGES
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices

implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture

usually defined by the hardware manufacturer, and is based on mnemonics that symbolize processing steps (instructions), processor registers, memory locations, and other language features

same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers

an assembly language program written for one type of CPU won't run on another

14

rd 3

GENERATION LANGUAGES
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

a refinement of a second-generation programming language

make the languages more programmerfriendly

High level language

Most 3GLs support structured programming

Example: Fortran, ALGOL, and COBOL, C, C++, C#, Java, BASIC and Delphi

15

th 4 GENERATION LANGUAGES
a programming language or programming environment designed with a specific purpose in mind, such as the development of commercial business software

Most 4GLs are used to access databases

to reduce programming effort, the time it takes to develop software, and the cost of software development

fourth-generation languages are programming languages closer to human languages than typical high-level programming languages.

16

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

th 5 GENERATION LANGUAGES
designed to make the computer solve a a programming language based given problem without the programmer around solving problems using the programmer only needs to worry about constraints given to the program, what problems need to be solved and what rather than using an algorithm conditions need to be met, without written by a programmer worrying about how to implement a routine or algorithm to solve them

based on artificial intelligence, are still in development, though there are some applications, such as voice recognition

The goal of fifth-generation computing is to develop devices that respond to natural language input and are capable of learning and selforganization

17

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

1.3 Explain Fundamentals Of Programming Languages

TERMINOLOGY
Programmer
someone who writes computer software a specialist in one area of computer programming or to a generalist who writes code for many kinds of software

Program
An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner

Programming
the process of designing, writing, testing, debugging, and maintaining the source code of computer programs

Assembler
A program that translates programs from assembly language to machine language.

Compiler
a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code)

Translator
A program that translate from one programming language into another

19

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Structured Programming
the top-to-bottom approach
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

It splits the tasks into modular forms. This makes the program simpler and easier to read with less lines and codes

This type of program accomplishes certain tasks for that a specific reason

decomposed into a hierarchy of processes. A process in this context is a body of code, typically a function or subroutine, that takes some input and manipulates it to produce an output

. A process may be composed of other, more specialized processes, i.e., it may be a function that calls other functions

20

Object Oriented Programming


uses sections in a program to perform certain tasks They are small programs that can be used in other software
FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

It splits the program into objects that can be reused into other programs

Each object or module has the data and the instruction of what to do with the data in it. This can be reused in other software

An object-oriented program is decomposed into a network of collaborating objects. An object represents a thing or concept and has a known set of behaviours that may be invoked by other objects

21

Structured programming is as follows: --Program start var var var function { ... } function { ... } function { ... } main { ... } --- Program End

22

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Object oriented is as follows: --- Program Start object { var var function { ... } function { ... } function { ... } } var var function { ... } main { ... } --- Program end

23

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

Structured vs Programming

Object Oriented Programming

24

FP 101 : PROGRAMMING PRINCIPLES (CHAPTER 1)

You might also like