1 Software Development Topic 2 Software Development Languages and Environments.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

compilers and interpreters
Software Development Languages and Environments. Programming languages High level languages are problem orientated contain many English words are easier.
Computers Are Your Future
Programming Types of Testing.
 Introduction to Programming History of programming.
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
SDP Languages and Environments. Types of Languages and Environments There are 4 main types of language that you must be able to describe at Higher level.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Systems Software Operating Systems.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Languages and Environments Higher Computing Unit 2 – Software Development.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Topics Introduction Hardware and Software How Computers Store Data
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Slide 1 Standard Grade Computing Studies Systems Software.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
CS101 Introduction to Computing Lecture Programming Languages.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Visual C++ Programming: Concepts and Projects
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
I Power Higher Computing Software Development Development Languages and Environments.
6. Program Translation CS100: The World of Computing John Dougherty Haverford College.
Computing Higher – SD Unit - Topic 5 – Languages and Environments P Lynch, St Andrew’s High School Unit 2 Software Development Process Topic 5 Languages.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
Introduction to Prolog. Outline What is Prolog? Prolog basics Prolog Demo Syntax: –Atoms and Variables –Complex Terms –Facts & Queries –Rules Examples.
Choosing the write programming language for the job. The choice of language may be based on: The experience and expertise of the development team. The.
Introduction to programming Carl Smith National Certificate Year 2 – Unit 4.
Intermediate 2 Computing Unit 2 - Software Development.
Programming and Languages Dept. of Computer and Information Science IUPUI.
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Installing Java on a Home machine For Windows Users: Download/Install: Go to downloads html.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Software Design and Development Languages and Environments Computing Science.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Development – Topic 2 Types of Programming Language.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Computer Systems Nat 5 Computing Science
Installing Java on a Home machine
Why don’t programmers have to program in machine code?
Development Environment
Exploring Excel Chapter 7 Automating Repetitive Tasks: Macros and
High and low level languages
Computer Systems Nat 5 Computing Science
CS101 Introduction to Computing Lecture 19 Programming Languages
A451 Theory – 7 Programming 7A, B - Algorithms.
Microsoft Excel 2003 Illustrated Complete
Developing Applications
Translators & Facilities of Languages
Installing Java on a Home machine
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Exploring Microsoft Excel
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
1.3.7 High- and low-level languages and their translators
Presentation transcript:

1 Software Development Topic 2 Software Development Languages and Environments

2 Translators ► As mentioned in the CS topic computers can only understand instructions and data that are written in binary form. ► Programs written in high level languages use lots of English like terms and need to be translated so that the computer can understand them. ► This is done by a piece of systems software called a translator. ► We will look at 2 types of translator: - ► Compiler ► Interpreter

3 Compiler This program converts high-level language code into machine code. The compiler takes all the source code (the high-level language program before anything is done to it) as one block and translates it into machine code. This translated program can be run at any time without the source code or the compiler because the translated program is stored as machine code and this machine code can be understood by the processor.

4 If a change is made to the source code then the program must be compiled again so that the change is incorporated in the finished compiled program. The finished compiled program is called object code. Object code is created every time the source code is compiled.

5 Interpreter An interpreter translates and executes each program instruction one at a time as the program is run. In simple terms the interpreter does the following: 1.Fetch instruction 2.Translate instruction into machine language equivalent(s) 3.Execute Programs translated using an interpreter can only be run in conjunction with the interpreter. If the interpreter is not present then the source code instructions cannot be translated into their machine code equivalents.

6 Compilers V Interpreters. 1. Compilers produce executable programs. E.g. They produce programs that can be run on a computer system without the need for the source code or the compiler/assembler to be present in the system. 2. Compiled programs run much faster than interpreted programs. This is because interpreted programs read and translate each instruction in turn and this takes time. Compiled programs already have all their instructions converted to machine code.  Loops run very slowly in interpreted programs because every line in the loop has to be translated every time it operates.

7 3. Interpreted programs take less time to develop (write) because if a change is made to the source code then this change is included in the next program run. However, with compilers any changes to the source code are not included in the executable code until the source code is re-compiled. Each time a change is made a new version of the executable program must be made.

8 ► The choice of which type of translator to use depends on the type of programs being written and the experience of the program writer. ► E.g. Complex programs written by experienced programmers for system software or applications tend to use compilers. TranslatorSpeedEasy to AlterEasy to Understand InterpreterSlowYes CompilerFastNoYes Summary

9 Programming Languages SDP Theory Booklet pages ► There are 4 main classifications of programming languages that we will concentrate on. These are  Procedural Languages  Declarative Languages  Event Driven Languages  Scripting Languages

Procedural Languages Key features ► Carried out in a fixed sequence with a start and end point ► Can be split into separate functions and procedures ► Have control structures such as If statements, for..next loops and do..while loops Examples of procedural languages are: ► BASIC ► Pascal ► C A lot of programmers are familiar with at least one procedural language

Example Pascal Procedural Code

Declarative Languages Key features ► Consist of facts and rules ► No fixed sequence of instructions ► Are queried (asked questions) which they try to find a solution to ► Uses pattern matching to answer queries  facts and rules combined in different ways until a solution, or no solution, is found Examples of declarative languages are: ► Prolog ► LISP ► ML ► Scheme ► Erlang languages such as Prolog and LISP are used predominantly in the field of Artificial Intelligence.

Here are some facts: Parent (Liz, Tom). means that Liz is a parent of Tom Female (Liz). means that Liz is female Male(Tom). Parent(Bert, Tom). Here is a rule: Mother(X, Y) :- means that X is a mother of Y IF Parent(X, Y), Female(X) X is a parent of Y AND X is female! Query could be Mother(X, Tom) which would give the answer X=Liz Example Prolog Declarative Code

Event Driven Languages Key Features ► no fixed order of instructions ► wait for user input (clicking a button) before performing an action ► front end for creating graphical user interfaces ► share the same type of language features as procedural languages Examples of event driven languages are: ► Visual Basic ► Delphi (Object Pascal) ► Smalltalk Used for creating a wide range of desktop applications for modern OS’s such as Mac OSX and Windows

Example Visual Basic Event Driven Code

Scripting Languages Key Features ► usually built-in to existing applications ► automate or extend the functionality of applications ► have extra functions, procedures and data types related to the application  Selection.Font.Name  Range(“A1”).Select ► run slower than other programs because they’re interpreted ► share the same type of language features as procedural languages Examples of scripting languages are: ► VBA (Visual Basic for Applications) ► Javascript ► TCL Lots of people create and use macros who wouldn’t consider themselves programmers

Example VBA Scripting Code

Macros Benefits of Macros ► Can extend and add new features to a program that the developers didn’t think of ► Can simplify and repeat complex or frequently used commands ► Can be assigned to a keyboard shortcut to make it easier to use when required Creating a Macro 1. Record a series of actions in an application you are using 2. Code gets generated and saved as a program script 3. Script can then be assigned to a keystroke Or 1. Write and save the script in an editor 2. Run the script in the application and find and fix any errors 3. Script can then be assigned to a keystroke

Example Exam Questions 1. Describe two characteristics of a scripting language not commonly found in a procedural language (2) 2. A program contains the following statement: Is_a(rover, dog). State which type of programming language is being used. (1) 3. State two benefits of using a macro to create an alphabetical list of customers whose account balance is over £5000. (2) 4. Macros are written in a high level language. State the type of high level language that is used to write macros. (1) 5. State two features of a declarative programming language (2) 6. State two methods of creating a macro (2)