Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.

Slides:



Advertisements
Similar presentations
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Advertisements

Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
Computers Are Your Future
Introducing Programming a general discussion. What is a Program? Sets of instructions that get the computer to do something Programs may be a few lines.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Computers: Tools for an Information Age
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
COMP Computer Basics Yi Hong May 13, 2015.
1 Chapter-01 Introduction to Computers and C++ Programming.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Programming Languages Generations
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
Chapter 1 An Overview of Computers and Programming Languages.
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.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Overview.ppt Overview-An Overview of Visual Basic.NET An Overview of Visual Basic.NET.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
Introduction to OOP CPS235: Introduction.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Lally School of M&T Pindaro Demertzoglou 1 Computer Software.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
The Functions and Purposes of Translators Translators, Interpreters and Compilers - High Level Languages.
Chapter 1 An Overview of Computers and Programming Languages.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Computer Basics.
Java Programming: From the Ground Up
Component 1.6.
Visit for more Learning Resources
Introduction to programming
Operating System Interface between a user and the computer hardware
Programming Language Hierarchy, Phases of a Java Program
Sections Basic Concepts of Programming
Mobile Development Workshop
CMP 131 Introduction to Computer Programming
High Level Programming Languages
Low Level Programming Languages
ICT Programming Lesson 1:
1.3.7 High- and low-level languages and their translators
Programming language translators
Presentation transcript:

Chapter 4 Software

Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An instruction is a pattern of ones and zeros stored in a “word” of computer memory. A “word” of memory is the basic unit of storage for a computer When a computer accesses memory, it usually stores or retrieves a word of information at a time.

Chapter 4: Software Generations of Languages A “word” of memory is the basic unit of storage for a computer 8 bits = 1 byte A 16-bit computer has a word size of 16 bits, or two bytes A 32-bit computer has a word size of 32 bits, or 4 bytes A 64-bit computer has a word size of 64 bits, or 8 bytes

Chapter 4: Software Generations of Languages First-Generation (Load the A-register from 64) Second-Generation – assembly language LDA 100 (Load the A-register from 100 octal = 64)

Chapter 4: Software Generations of Languages Third-Generation FORTRAN – first third-generation language x = y + z Statements look something like English and mathematical statements. Easier to read and write. C, C++, Java, BASIC, Visual Basic, COBOL

Chapter 4: Software Compilers and Interpreters A compiler is a program for creating machine language from a high-level programming language. The job of the compiler is to translate the source code into machine code. The result of compiling a program is a file of object code, which is a binary file of machine instructions that will be executed when the program is run.

Chapter 4: Software Compilers and Interpreters Interpreters translate source code to machine code one source code line at a time and they do this every time the program runs. Unlike Compilers translate all lines of source code at once and only once. Compilers do not run when the program runs.

Chapter 4: Software Compilers and Interpreters Compiled programs run faster but it’s harder to find and fix errors. Interpreters run slower, however, it’s easier to find and fix errors because interpreters usually provide better error messages and it’s quicker to rerun an interpreted program because the program doesn’t have to be compiled first.

Chapter 4: Software Virtual Machines Generally describes an additional layer of abstraction between the user and the hardware. It is also used to describe software that makes one type of computer appear to be another.

Chapter 4: Software Virtual Machines Java Virtual Machine (JVM) Java is both compiled and interpreted The Java compiler (javac) translates Java source code into “bytecode” which is platform-independent intermediate code. When the Java program runs the JVM interpretes the bytecode into machine code.

Chapter 4: Software Procedural Programming A list of instructions to be executed in order. The code for a specific job is contained in a named procedure also known as a subroutine. This is called structured/modular programming. The subroutines can be reused throughout the program. Write once, use many.

Chapter 4: Software Object-Oriented Programming Instead of subroutines, OO programming relies on software objects as the unit of modularity Objects are called “classes” Classes have attributes and behaviors Attributes are defined using instance variables. Behavior are defined using subroutines aka methods Automobile class Attributes: four wheels, a motor, seats…etc. Behavior: change speed, park, turn, refuel.

Chapter 4: Software Object-Oriented Programming Encapsulation – reliable operation even as things change. If the creator of the class decides to make a change, the interface will remain the same. Inheritance – ability to create a class by inheriting attributes and methods from another class. Polymorphism – A method of a given name may be different depending on the class of the object for which the method is invoked.

Chapter 4: Software Summary The machine instruction sets themselves constituted the first generation programming languages. Programs were conceived as sequences of machine operations, and programmers worked directly with the hardware, often entering code in ones and zeros directly through the front panel switches. Assembly languages, using mnemonic character strings to represent machine instructions, made up the second generation of programming languages. Beginning with FORTRAN in 1954, third-generation languages allowed programmers to work at a higher level, with languages that were much more independent of the computer hardware. Programs can be compiled or interpreted. Compilers generate machine instructions that can run directly on the computer, independent of further availability of the compiler program. Interpreters, on the other hand, are programs that read and execute source code a line at a time. Java is an environment that uses both. Java source code is compiled into machine- independent bytecode, and the Java Virtual Machine interprets the bytecode at execution. Many JVM implementations today also compile bytecode to machine instructions.