Top-Rated Free Essay
Preview

Application of Computers in Education Sector

Powerful Essays
1726 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Application of Computers in Education Sector
Lecture 1: Introduction to Programming

2013/14 Academic Year By Prof. Elijah I. Omwenga

Introduction to Programming
Program: The term program refers to a set of instructions that instructs a computer on what to do. Programs are Solutions to Problems. These instructions are written using programming languages.

A program can instruct a computer to: – Read/ accept Input data – Calculate or compare – Store data – Write or display Output The term software refers to a computer program or set of programs and its associated documentation such as user guide, technical manual

Programming Languages
• Programming: This refers to the process of writing computer programs using a programming language • The person who write such instructions is a programmer • Mathematicians have been credited for designing most of the programming languages and programs in the history of computing

Programming Languages
• Each natural language has a systematic method of using symbols of a language. This is dictated by rules of grammar – semantic (structure)and syntax (words and symbols) • Similarly, computer programming languages are governed by the structure and syntax. • In natural languages one can break the syntax rule, but we can use inference (guesswork) to get what the person means. However, computers being machines, are receptive to only the exact syntax rules of the language being used.

Types of Programming Languages
• A programming Language - is a set of rules that provides a way of writing instructions that instructs a computer on what operations to perform. • Programming languages can be classified into two broad categories namely: • Low level programming Languages • High level programming Languages • Low level languages further classified into two generations namely: – First Generation- Machine languages – Second Generation -Assembly languages

Types of Programming Languages
2. High-level languages further classified into three generations namely: – Third Generation- Procedural languages – Fourth Generation - Problem-oriented languages – Fifth Generation - Natural languages

Low Level Languages

Machine languages
• This is the oldest form of computer programming used to program first generation computers such as UNIVAC and ENIAC. Plug boards were used to represent data in binary (machine) form in the computer the circuitry.

• Data represented in series of 1s and 0s are said to be in machine language. For example, the code below represent a segment of a machine code:
1011010100 1010111101 1000100100

• Machine language also varies according to make of computer, another characteristic that make them hard to work with.

Assembly languages
Assembly language use symbolic (mnemonics) such as ADD which allowed programmers to specify instructions simple words such as ADD, MP etc. To convert a program from assembly to binary form, a translator known as assembler was used.

Compared to machine languages, assembly languages are much easier for humans to understand and to use.
The machine language code we gave above could be expressed in assembly languages as: ADD 210(8,13),02B(4,7) PACK 218(8,13),02F(4,7) MP 212(6,13),21D(3,13)

Advantages of low level languages
1. They are executed very fast since no translator or minimum translation is involved. 2. 3. They require very little memory space. They have a high level of security since a program

written in machine language is difficult to change or alter. Disadvantages of low-level languages
1. 2. 3. 4. Machine languages are time-consuming because the binary code instructions are complex. They are difficult to understand. They are difficult to debug and hence difficult to maintain. They are not portable i.e can only be used by specific computers.

High level languages

Procedural Languages
• Procedural languages, also known as third generation languages uses human language. The are intended to solve general problems. Examples of procedural languages are C, Pascal, FORmula TRANslation (FORTRAN), Common Business-Oriented Language (COBOL) . • Like assembly languages, procedural languages must be translated into machine language so that the computer processes it. depending on the language this translation is performed by either a compiler or an interpreter.

Language Processors (Translators)
• There are two categories of translators used to convert a program written using a high level language into object code These are: • Compiler • Interpreter • A compiler converts the programmer's procedural language program, called the source code into a machine language called the object code.

• This object code can then be saved and run later.



Examples of procedural languages that use compilers are the C/C++, PASCAL, COBOL, and FORTRAN. An interpreter converts the Procedural languages one statement at a time into machine code just before it ts to be executed. No object code is saved. a example of procedural language using an interpreter is the old versions of BASIC (Beginners All-Purpose Symbolic Instruction Code).





Translation process

Source code (high-level languages)

IF GRADE >50 THEN PROCEED ELSE RESIT EXAM

Compiler/Interpreter Object Code
10010101001010001010100 10101010100011101111011 10110111100011100101011

4th Generation Languages
• Unlike general purpose languages, 4th GLs also referred to as problem-oriented languages are designed to solve specific problems • While 3rd GLs focus on procedures and how a program will accomplish a specific task, 4th GLs are non-procedural and focus on specifying what the program is to accomplish • They require fewer instructions to accomplish a task than a third generation language. They are mostly used with databases as: • Query languages such as SQL • Report generators • Forms and application generators

Natural Programming Languages
 As they have evolved through the generations, computer languages have become more human-like  Clearly, the fourth generation query languages using commands that include words like SELECT, FROM and WHERE, is much more human-like than the 0s and 1s of machine languages  The 4GLs are still long way from natural languages people use  The standard definition of a 5th GL is a computer language that incorporates the concepts of artificial intelligence to allow direct human communication. Examples are PROLOG, LISP SCHEME and SML.

Natural Programming Languages
 These languages would enable a computer to run and to apply new information as people do. Rather than coding by keying in specific commands we would communicate more directly to a computer using natural languages or human languages such as English or Spanish.  Recently, the definition 5th GL has been expanded to include Visual Programming Languages such as Visual PROLOG that provide a natural interface for program development.  This interface provides intuitive icons, menus and drawing tools for creating program code.

Advantages of high level languages
• • • • • English-like phrasing of high level languages makes them easy to understand High level languages are portable i.e they are transferable from one computer to another They are user-friendly and easy to use and learn They are more flexible, hence they enhance creativity of the programmer and increase productivity in the work place High level languages are far much more easy to debug

Disadvantages of high level languages
1. Their nature encourages loading of instructions in a word or statement hence the complexity of these instructions cause slower program processing 2. They have to be interpreted or compiled for translation to machine language before the computer can trace them

Summary of programming languages
LANGUAGE INTRODUCED EXAMPLES

Machine Language Assembly (Symbolic) Language High Level Languages

1940s Late 1950s 1960s to Late 1980s

0s and 1s only Assembly Language PL1, PASCAL, FORTRAN, C, C++

Natural Languages

Latest

LISP, PROLOG

Special Programming Languages
These are languages that are used to support certain functionalities such as web page formatting. These include:  Scripting Languages
JavaScript and VBScript Php and ASP Perl and Python


Command Languages sh, csh, bash

Special Programming Languages


Text processing Languages
PostScript



HTML
HyperText Markup Language Used on the Internet and the World Wide Web (WWW) Web page developer puts brief codes called tags in the page to indicate how the page should be formatted

Programming Paradigms


Two broad groups
Traditional programming languages
 Sequences

of instructions  First, second and some third generation languages

Object-oriented languages
 Objects

are created rather than sequences of instructions  Some third generation, and fourth and fifth generation languages

Some programming languages


FORTRAN
FORmula TRANslation that was developed at IBM in the mid-1950s. Designed for scientific and mathematical applications by scientists and engineers.



COBOL
COmmon Business Oriented Language developed in 1959. Designed to be common to many different computers. Typically used for business applications.

Traditional Programming Languages


C

Developed by Bell Laboratories in the early 1970s. Provides control and efficiency of assembly language while having third generation language features. Often used for system such as UNIX operating system.


BASIC
Beginner’s All-purpose Symbolic Instruction Code. Developed at Dartmouth College in mid 1960s. Developed as a simple language for students to write programs which they could interact through terminals.

Object-Oriented Programming Languages


Simula
First object-oriented language Developed by Ole Johan Dahl in the 1960s.



Smalltalk
First purely object-oriented language. Developed by Xerox in mid-1970s. Still in use on some computers.

Object-Oriented Programming Languages (cont’d.)


C++
It is C language with additional features. Widely used for developing system and application software. Graphical user interfaces can be developed easily with visual programming tools.

Object-Oriented Programming Languages (cont’d.)


JAVA
An object-oriented language similar to C++ that eliminates lots of C++’s problematic features Allows a web page developer to create programs for applications, called applets that can be used through a browser. Objective of JAVA developers is that it be machine, platform and operating system independent.

What determines a “good” language


Formerly: Run-time performance
(Computers were more expensive than programmers)



Now: Life cycle (human) cost is more important
Ease of designing, coding Debugging Maintenance Reusability

Criteria in a good language








Writability: The quality of a language that enables a programmer to use it to express a computation clearly, correctly, concisely, and quickly. Readability: The quality of a language that enables a programmer to understand and comprehend the nature of a computation easily and accurately. Reliability: The quality of a language that assures a program will not behave in unexpected or disastrous ways during execution. Maintainability: The quality of a language that eases errors can be found and









Generality: The quality of a language that avoids special cases in the availability or use of constructs and by combining closely related constructs into a single more general one. Extensibility: The quality of a language that provides some general mechanism for the user to add new constructs to a language. Standardability: The quality of a language that allows programs written to be ported from one computer to another without significant change in language structure. Implementability: The quality of a

You May Also Find These Documents Helpful

  • Better Essays

    DSC 340 Midterm

    • 1391 Words
    • 6 Pages

    computer program or collection of programs-set of instructions that tell the hardware what to do…

    • 1391 Words
    • 6 Pages
    Better Essays
  • Good Essays

    pt1420 exam review

    • 738 Words
    • 3 Pages

    The words that make up a high level programming language are known as what? Keywords…

    • 738 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    CSO Gaddis Java Chapter1 1

    • 2953 Words
    • 29 Pages

    1-5 Why Program? • Computers are tools that can be programmed to perform many functions, such as: • spreadsheets • games • databases • etc. • word processing • Computers are versatile because they can be programmed. • Computer Programmers implement programs that perform these functions. © 2012 Pearson Education, Inc.…

    • 2953 Words
    • 29 Pages
    Satisfactory Essays
  • Good Essays

    Psychology Key Terms

    • 540 Words
    • 3 Pages

    algorithms - An algorithm is a set of instructions for solving a problem or completing a process…

    • 540 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    sweg

    • 364 Words
    • 2 Pages

    4. Computer Software – The program or instructions that tell the computer what to do. Microsoft word is Computer Software.…

    • 364 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    pt1420 assignment 1

    • 728 Words
    • 3 Pages

    Programming language is a vital and essential part of computers. Even though you do not actually see these languages, they are the bases and make up of software programs. Software is essential to a computer because without software, a computer can do nothing. All of the software that we use to make our computers useful is created by individuals known as programmers; these programmers use different types of programming languages to develop software programs. The first primitive programming language was actually created for the invention of the ‘difference engine’. This invention created in 1822 by Charles Babbage was a mechanical calculator that would tabulate polynomial functions.…

    • 728 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    * Programming is the process of turning the system design specification in to computer code.…

    • 297 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Pseudocode

    • 465 Words
    • 2 Pages

    A computer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem. A…

    • 465 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Software is a collection of computer programs and related data that provide the instructions telling a computer what to do and how to do it. We can also say software refers to one or more computer programs and data held in the storage of the computer for some purposes.…

    • 1154 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    There are a lot of programming languages at present. There are many computer languages - "FORTRAN", "COBOL", "BASIC", "Pascal", "C++", "Java", etc. - just like there are many human languages. They all express approximately the same concepts in different ways. They all have their own features, for example BASIC language is a very easy language to start with, but is not so much versatile compared to C++. Using C++, it is even possible to control the hardware of your system,…

    • 714 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    C Language Notes

    • 5409 Words
    • 22 Pages

    2. In this category we are able to create our project or programs using procedural approach means in this type we can able to divide our big project/program into small subroutines or procedures. After making procedures we can able to call a ‘procedure’ one or more places.…

    • 5409 Words
    • 22 Pages
    Powerful Essays
  • Satisfactory Essays

    abcdddddd

    • 5384 Words
    • 22 Pages

    All praises and thanks are for Almighty ALLAH Who is the source of all knowledge and wisdom endowed to mankind and to the humanity as a whole.…

    • 5384 Words
    • 22 Pages
    Satisfactory Essays
  • Powerful Essays

    Meiosis

    • 1790 Words
    • 8 Pages

    Today's lecture will be a quick history of programming languages. Since 1957 when the first Fortran was introduced for the IBM 704, literaly hundreds of new programming languages have come and gone--well, some of them have gone, and others--like Fortran, have managed to stay around. The sheer number of languages makes it impossible to cover them all in any depth--indeed, even the most important languages we will only have time to discuss in shallow detail today. As a result, we talk about only the most important languages--those that had historical significance either for their new ideas or their influences on the languages that followed them.…

    • 1790 Words
    • 8 Pages
    Powerful Essays
  • Good Essays

    Microcontrollers are special purpose microprocessors that can be embedded in devices such as refrigerators, cars, and washing machines.…

    • 684 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Introduction To JavaScript

    • 3905 Words
    • 44 Pages

    Introduction to JavaScript introduction What Web scripting is?  How scripting and programming are different (and similar)  What JavaScript is?    JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari.…

    • 3905 Words
    • 44 Pages
    Good Essays

Related Topics