5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007.

Slides:



Advertisements
Similar presentations
Computers Are Your Future
Advertisements

CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
PROGRAMMING Introduction To Programming Definition Types Of Programming Languages Programming Language Paradigm Translator
2 We need programming languages to communicate with a computer. The two broad classifications of programming languages are: Low-level and High- level.
Chapter 13 Programming Languages and Program Development
Software: Systems and Application Software
Computers Are Your Future © 2006 Prentice Hall, Inc.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computers: Tools for an Information Age
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
ALGORITHMS AND PROGRAMMING LANGUAGES Lecture 5: Algorithms and programming languages Networks and Communication Department 1.
Your Interactive Guide to the Digital World Discovering Computers 2012.
CS102 Introduction to Computer Programming
Chapter 11 Information System Development and Programming Languages.
Chapter 13 Programming Languages and Program Development 1.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Programming Languages: Telling the Computers What to Do Chapter 16.
Introduction to Computer Programming itc-314
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
Copyright©2008 N.AlJaffan®KSU1 Chapter 11 Information system development and programming language.
An Introduction to Programming with C++ Sixth Edition
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Chapter 15 Program Development and Programming Languages.
Evolution and History of Programming Languages. Machine languages Assembly languages Higher-level languages To build programs, people use languages that.
Evolution and History of Programming Languages. Software Programming Language.
The Teacher Computing Computer Languages [Computing]
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Identify object-oriented programming languages. A computer program is a series of instructions that direct a computer to perform specific tasks. A programming.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
PROGRAMMING LANGUAGES
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
Slide 8-1 Chapter 8 Terms Programming Languages Introduction to Information Systems Judith C. Simon.
Introduction to Computer Programming itc-314 Lecture 04.
Lecture-8 Introduction to computer languages.
Programming Languages and the Programming Process lesson 28.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Introduction to Programming Languages © 2005 Prentice Hall, Inc. CXC IT Unit 2: Intro. to Programming.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
GROUP 2 NAME :  AZMYLL BIN ARSHAD  (18DNS14F2014)  MARYAM JAMILAH BINTI RAHIM  (18ENS14F2004)  SURAYA BINTI MOHAMAD  (18DNS14F2005)  MUHAMMAD SALEH.
Chapter 1: Introduction to Computers and Programming.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Computer Language
IS220 Computer Programming
Programming Languages
CSCI-235 Micro-Computer Applications
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
An Introduction to Programming with C++ Fifth Edition
Presentation transcript:

5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007

Activity 1: Turtle Graphics move forward 3cm. rotate 135 o to the right. move forward 3.5cm. rotate 135 o to the left. move forward 3cm. **Note: Turtle graphics in one of the feature in a programming language called LOGO. WHAT IS IN YOUR DRAWING ? ? ? Hold the pencil upright. Place the pencil tip on a paper. Keep the pencil tip on the paper at all times during the drawing process. Perform a task based on the following instructions.

5.1 Basic Programming Concepts Learning outcomes: –Define Program and Programming Language State the definition of program. State the definition of programming language. –Identify the levels and generations Of Programming Languages Identify the generations of low-level programming languages with examples. Identify the generations of high-level programming languages with examples. Duration: 2 periods

Definition of Program A series of instructions Task

Definition of Program Private Sub cmdCalculate_Click() Dim area As Double area = Val(Text1.Text) * Val(Text2.Text) lblarea.Caption = FormatNumber(area, 2) End Sub Private Sub cmdClear_Click() Text1.Text = "" Text2.Text = "" lblarea.Caption = "" Text1.SetFocus End Sub Private Sub cmdExit_Click() End End Sub Figure B Figure A A series of instructions that directs a computer to perform task.

A person who writes and modifies a computer program is called ______________, sometimes called developer. A developer uses a __________________________ to write a computer program. Definition of Program

Definition of Programming Language A set of words, symbols, and codes that enables a programmer to communicate instructions to a computer. Several hundreds of programming languages exist today. Visual BasicJava CC++ COBOL C# J++ BASIC PASCALProlog SQLLogo

Each instruction causes computer to carry out one step of the task Definition of Programming Language

Each programming language has its own rules for writing the instructions. You cannot apply the rules of Visual Basic Programming Language in C or Java. public class HelloWorld { public static void main (String[] args) { System.out.println("Hello, world!\n"); } } Private Sub cmd_Click() Text1.Text=“Hello, World!” End Sub Java Programming Language Visual Basic 6 Programming Language Definition of Programming Language

Language used to instruct a computer to perform a specific task called __________. Definition of Programming Language

Languages often are designed for specific purposes, such as scientific applications, business solutions or web page development Logo: A programming language designed really for young kids. Prolog: A language used for the development of artificial intelligence applications. COBOL: A language designed for business application. Definition of Programming Language

Answer all the questions What is computer program ? Give two examples of computer programs. What is programming Language ? Explain the function of programming language. Definition of Programming Language

Levels and Generations Of Programming Languages 2 levels of programming languages Low-level language High-level language Low-level language –A language that is machine-dependent. –A machine-dependent language runs on only one particular type of machine. These programs are not easily portable to other types of computers. –Each language instruction in low-level language usually equates to a single machine instruction.

High-level language –A language that is machine-independent. –A machine-independent language runs on different types of machines and operating system. –Each language instruction in high-level language usually equates to multiple machine instructions. Levels and Generations Of Programming Languages

Based on the text in slide 11 & 12, complete the table below. The differences between low-level language and high-level language Low-level languageHigh-level language Levels and Generations Of Programming Languages

Examples Of Programming Languages

Low-level languages 2 types: –Machine Language –Assembly Language High-level languages 3 types: –Third-generation language (3GL) –Fourth-generation language (4GL) –Fifth-generation language (5GL) Levels and Generations Of Programming Languages

Machine Language –First generation programming language –The only language the computer directly recognizes. Therefore, a machine language program does not require a translator. Levels and Generations Of Programming Languages

Machine Language –The instructions in machine language use a series of binary digits (1s and 0s) or a combination of numbers and letters that represents binary digits. –Readily understood by computers; less intelligible by humans –Coding in machine language is tedious and time-consuming. Levels and Generations Of Programming Languages

Assembly Language –2 nd generation programming language Levels and Generations Of Programming Languages Example: A for addition, C for Compare, L for Load and M for multiply. Example: Use the name RATE to refer to the storage location that contains a pay rate. symbolic instruction codes (meaningful abbreviations). Symbolic address (meaningful name) to identify the storage location The instructions use :

Assembly Language Levels and Generations Of Programming Languages

Assembly Language –The assembly language is not the native language of computer. Thus, the program must be converted into machine language using a translator called assembler, before a computer can execute/run it. –Easier to code as compared to machine language. But it can still be difficult to learn. “The computer cannot directly run the assembly source program.” Low-level Programming Languages

Third-Generation Language –Procedural language –The instructions in 3GL use a series of English-like words. –Many 3GLs also use arithmetic operators such as * for multiplication and + for addition. High-level Programming Languages Programmers writes the instructions that tell the computer what to accomplish and how to do it. The program is based on a logical step-by-step process for solving a problem.

Third-Generation Language –The 3GL is not the native language of computer. Thus, the program must be converted into machine language using a translator either compiler or interpreter, before a computer can execute/run it. High-level Programming Languages –Simplify the program development process for programmers. Easier to code and maintain a program as compared to low-level language. –Examples: COBOL, Pascal, C, Fortran, BASIC, C++, Java, ALGOL, Delphi 3GL Compiler / Interpreter Machine language

Fourth-Generation Language –Non-procedural language –Allow people to develop program with fewer commands High-level Programming Languages Non-procedural programming languages allow users and programmers to specify the results they want without specifying how to solve the problem.

Fourth-Generation Language –The instructions in 4GL use English-like words or graphical environment to retrieve data from files or database. –Examples SQL,Progress 4GL, ColdFusion (web development), GEMBase, BuildProfessional, FOCUS, Informix-4GL. High-level Programming Languages

3GL Vs 4GL Example: In dBASE, the command List displays all the records in a data file. In second- and third-generation languages, instructions would have to be written to read each record, test for end of file, place each item of data on screen and go back and repeat the operation until there are no more records to process. dBASE 3GL use customer do while.not. eof() list name, address ? name, address skip enddo dBASE 4GL use customer list name, address High-level Programming Languages

Fifth-Generation Language –5GLs are designed to make the computer solve the problem for you. –The programmer only needs to worry about what problems need to be solved and what conditions need to be met, without worrying about how to implement a routine or algorithm to solve them. –mainly used in artificial intelligence research. –Examples: Prolog, Mercury, OPS5 High-level Programming Languages

Draw a hierarchy chart to classify the generations of each level of programming language. Programming Language Example Assessment Self - assessment

Programming LanguagesGeneration Low-level programming languages: More technical not portable less user-friendly Run faster Lengthy 1GL Machine Language 2GL Assembly Language High-level programming languages: Less technical Portable More user-friendly Run slower shorter than 1GL and 2GL 3GLs Procedural language 4GLs Non-procedural language 5GLs mainly used in artificial intelligence research Summary