Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.

Slides:



Advertisements
Similar presentations
Computers Are Your Future
Advertisements

CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
Chapter 13 Programming Languages and Program Development
Programming Creating programs that run on your PC
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer 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.
Discovering Computers 2008 Chapter 13 Programming Languages and Program Development.
© Prentice Hall CHAPTER 3 Computer Software.
Objectives Overview Define system development and list the system development phases Identify the guidelines for system development Discuss the importance.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Computer Programming How Can You Create Your Own Software? Chapter 13.
Your Interactive Guide to the Digital World Discovering Computers 2012.
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
Introduction to Programming End Show. Resource Team R.P Ranjan-Lecturer, SPICTEC, Galle. W.M.A.S. Wijesekara-Centre manager,CRC Hali-Ela H.P.U.S Indra.
Chapter 11 Information System Development and Programming Languages.
Chapter 13 Programming Languages and Program Development.
Chapter 13 Programming Languages and Program Development 1.
Discovering Computers 2009 CSC 1100 Computer Literacy Dr. Carlos E. Otero Introduction to Computer Programming.
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.
Microsoft Visual Basic 2005: Reloaded Second Edition
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Copyright©2008 N.AlJaffan®KSU1 Chapter 11 Information system development and programming language.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Chapter 15 Program Development and Programming Languages.
Computer Concepts 2014 Chapter 12 Computer Programming.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
Chapter 3: Computer Software. Stored Program Concept v The concept of preparing a precise list of exactly what the computer is to do (this list is called.
1 Chapter 13 Understanding Computers, 11 th Edition 13 Program Development and Programming Languages TODAY AND TOMORROW 11 th Edition CHAPTER.
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
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.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
Identify object-oriented programming languages. A computer program is a series of instructions that direct a computer to perform specific tasks. A programming.
Chapter 13 Programming Languages and Program Development.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 4 Computer Software.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Copyright © 2015 Pearson Education, Inc. Chapter 6: Programming Languages.
5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007.
Software: Systems and Applications Software. The Importance of Software in Business time 1950today $ Software Hardware High Low.
Introduction to Computer Programming itc-314 Lecture 04.
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.
CSC141 Introduction to Computer Programming Programming Language.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
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.
CHAPTER ELEVEN Information System Development and Programming Languages Copyright © Cengage Learning. All rights reserved.
Ch. 7 Programming Languages
Chapter 4 Computer Software.
Developing Applications
Chapter 6: Programming Languages
Chapter 6: Programming Languages
and Program Development
Presentation transcript:

Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent runs only on one type of computer Often machine-independent can run on many different types of computers Machine and assembly languages are low-level

Generations of programming languages

The evolution of programming paradigms Imperative or Procedural Declarative Functional Object Oriented

Low-Level Languages What is machine language?  Only language computer directly recognizes

Low-Level Languages What is assembly language?  Instructions made up of symbolic instruction codes, meaningful abbreviations and codes  Source program contains code to be converted to machine language

Second-generation: Assembly language A mnemonic system for representing programs  Mnemonic names for op-codes  Names for all registers  Identifiers = descriptive names for memory locations, chosen by the programmer

Assembly language characteristics One-to-one correspondence between machine instructions and assembly instructions  Programmer must think like the machine Inherently machine-dependent Converted to machine language by a program called an assembler

Assembly language example Machine language 156C 166D CE C000 Assembly language LD R5, Price LD R6, ShippingCharge ADDI R0, R5 R6 ST R0, TotalCost HLT

Third generation language Uses high-level primitives  Similar to our pseudocode in Chapter 5 Machine independent (mostly) Examples: FORTRAN, COBOL Each primitive corresponds to a short sequence of machine language instructions Converted to machine language by a program called a compiler

Procedural Languages What is a procedural language? Most widely used are BASIC, COBOL, and C Uses series of English-like words to write instructions third-generation language (3GL) Often called third-generation language (3GL) Programmer writes instructions that tell computer what to accomplish and how to do it

Procedural Languages What is a compiler?  Program that converts entire source program into machine language before executing it

Procedural Languages What is an interpreter?  Program that translates and executes one program code statement at a time  Does not produce object program

Procedural Languages What is COBOL?  Designed for business applications  English-like statements make code easy to read, write, and maintain  COmmon Business-Oriented Language

Procedural Languages What is C?  Powerful language originally designed to write system software  Requires professional programming skills

The composition of a typical imperative program or program unit

Variable declarations in C, C++, C#, and Java

Control structures and their representations in C, C++, C#, and Java

The for loop structure and its representation in C++, C#, and Java

The flow of control involving a procedure

The procedure ProjectPopulation written in the programming language C

Executing the procedure Demo and passing parameters by value

Executing the procedure Demo and passing parameters by reference

The translation process

A syntax diagram of our if-then-else pseudocode statement

An object-oriented approach to the translation process

Object-Oriented Programming Languages What is an object-oriented programming (OOP) language? Used to implement object-oriented design Major benefit is ability to reuse existing objects Event-driven— checks for and responds to set of events C++ and Java are complete object-oriented languages Object is item that contains data and procedures that act on data Event is action to which program responds

Object-Oriented Programming Languages What is C++?  Includes all elements of C, plus additional features for working with object-oriented concepts  Used to develop database and Web applications

Object-Oriented Programming Languages What is Java?  Developed by Sun Microsystems  Similar to C++ but uses just-in-time (JIT) compiler to convert source code into machine code

Object-Oriented Programming Languages What is a visual programming language? Programmer writes and implements program in segments Visual programming environment (VPE) allows developers to drag and drop objects to build programs Often used in RAD (rapid application development) environment Sometimes called fifth-generation language Provides visual or graphical interface for creating source code

Object-Oriented Programming Languages What is Visual Studio.NET 2003?  Suite of visual programming languages and RAD tools .NET is set of technologies that allows program to run on Internet  Visual Basic.NET 2003 is used to build complex object-based programs Step 1. The programmer designs the user interface. Step 2. The programmer assigns properties to each object on the form. Step 4. The programmer tests the application. Step 3. The programmer writes code to define the action of each command button.

Objects and Classes Object = active program unit containing both data and procedures Class = a template for all objects of the same type An Object is often called an instance of the class.

Components of an object Instance variable = variable within an object Method = function or procedure within an object  Can manipulate the object’s instance variables Constructor = special method to initialize a new object instance

The structure of a class describing a coin public class Coin { private final int HEADS = 0; private final int TAILS = 1; private int face; // Sets up the coin by flipping it initially. public Coin () { flip(); } // Flips the coin by randomly choosing a face value. public void flip () { face = (int) (Math.random() * 2); } constructor Instance variable Method

Nonprocedural Languages and Program Development Tools  What are nonprocedural languages and program development tools? Nonprocedural Language The programmer writes English- like instructions or interacts with a visual environment to retrieve data from files or a database Program Development Tools User-friendly programs designed to assist both programmers and users in creating programs

Nonprocedural Languages and Program Development Tools What is RPG (Report Program Generator)?  Nonprocedural language used for generating reports, performing computations, and updating files

Nonprocedural Languages and Program Development Tools What is a fourth-generation language (4GL)?  Nonprocedural language that allows access to data in database  Popular 4GL is SQL, query language that allows users to manage data in relational DBMS

Nonprocedural Languages and Program Development Tools What is an application generator?  Program that creates source code or machine code from specification  Consists of report writer, form, and menu generator  Form provides areas for entering data

Nonprocedural Languages and Program Development Tools What is Visual Basic for Applications (VBA)?  Macro programming language  Macro—series of statements used to automate tasks