1 / 17

Chapter 1: Introduction to Programming Language

Chapter 1: Introduction to Programming Language. Generation Of Programming Languages. Programming Languages.  A set of rules that telling a computer what to do.  There are over 200 programming languages in the world.  Helps we understanding computer.

Download Presentation

Chapter 1: Introduction to Programming Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1: Introduction to Programming Language CSC425 - Introduction To Computer Programming

  2. Generation Of Programming Languages Programming Languages •  A set of rules that telling a computer what to do. •  There are over 200 programming languages in the world. •  Helps we understanding computer. •  We need programming languages • as an alternative to a manual system • diadvantages of manual system: • slow • repetitive • incorrect data/information CSC425 - Introduction To Computer Programming

  3. Programming Approach 2 types : Structured and object - oriented. 1. Structured Programming  A methodology in which all program logic is constructed from a combination of three control structures : sequence, selection and repetition (loop)  Program logic is description of the step-by step procedures for a module. CSC425 - Introduction To Computer Programming

  4. 2. Object-oriented programming  Packaged the data and procedure into a single unit called an object which can be reused and modified.  Object have classes and subclasses.  Each class contains the characteristics that are unique to objects of that class. data- called attributes or variables procedure - the instructions that tell the data what to do - called operations or method. CSC425 - Introduction To Computer Programming

  5. Evaluation Of Programming Languages Machine Language Assembly Language High-Level Language 3GL 4GL 5GL CSC425 - Introduction To Computer Programming

  6. Machine Language (1940s – 1950s)  Lowest level of language  Represent data and program instructions as 1s and 0s  The only language that computer directly understand. (Do not require translator)  Not convenient to read and use.  First generation language  Machine - dependent CSC425 - Introduction To Computer Programming

  7. Assembly Language (1950s – 1960s)  Second generation language  Developed to replace 1s and 0s use in machine language.  Use mnemonic codes : abbreviations that easy to remember A for Add C for Compare MP for Multiply  Requires a translator to translate the assembly program into machine language ( assembler).  Difficult to learn  Machine-dependent CSC425 - Introduction To Computer Programming

  8. High Level Language  Made easy for programmer to develop and maintain program  Machine- independent (can run on may different types of computers)  Have 3 categories : third, fourth and fifth generation  Written in series of English-like words  Must be translated to machine code first. (Use translator) CSC425 - Introduction To Computer Programming

  9. 3rd Generation Language (1960 – 1970)  Instruction is written as a series of English-like words.  Often are called procedural languages  Translation is performed using compiler or translator  Example of 3GL programming language: FORTRAN, COBOL and BASIC CSC425 - Introduction To Computer Programming

  10. FORTRAN  Stands for FORmula TRANslator  Develop in the late 1950s by team of IBM  Designed for scientific applications  Used most often by scientist, engineers and mathematicians. F O R T R A N Example coding in FORTRAN CSC425 - Introduction To Computer Programming

  11. COBOL  Common Business Oriented Language  was developed in the early 1960s  more widely used used for business applications  easy to read, write and maintain BASIC  Was develop in the mid - 1960s by John Kemeny and Thomas Kurtz  Easy to learn and used  Widely used for education and business application. CSC425 - Introduction To Computer Programming

  12. 4th Generation Language (1970s – 1980s)  Also uses English-like statements  Non- procedural languages - only to specify what is to be accomplished without explaining how  Coding programs requires less time and effort  Example of programming language : PROLOG, FOCUS, LISP and FORTH CSC425 - Introduction To Computer Programming

  13. 5th Generation Language (1990s)  Also called natural language.  A type of query language that allows the user to enter requests that resemble human speech.  Translate human instructions into code the computer understands.  Sometimes referred to as knowledge-based language. CSC425 - Introduction To Computer Programming

  14. Example of Natural language Welcome to Inquiry What would you like to know? Do we have hammer #37645? One moment please.. Yes, we have 14 hammer #37645. Do we have 1 box nails #3601? One moment, please. No nails #3601 in stock. CSC425 - Introduction To Computer Programming

  15. Language Translator •  Program need to translate because computer only understand machine language. •  Three kind of translator : • - Assembler • - Compiler • - Translator •  Used in assembly language for translate the language to machine language Assembler CSC425 - Introduction To Computer Programming

  16. Interpreter •  Translates one program code statement at a time. •  Immediately displays feedback when it finds error. •  Use for Basic Source program INTERPRETER RESULTS Data CSC425 - Introduction To Computer Programming

  17. Compiler •  Translating the source code from its original language into machine code. •  Converts the entire source program into machine language at one time •  Use for C and Cobol COMPILER OBJECT PROGRAM RESULTS Source program Program Listing Data CSC425 - Introduction To Computer Programming

More Related