Software Development – Topic 2 Types of Programming Language.

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.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
Programming Types of Testing.
Programming Logic and Design, Third Edition Comprehensive
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.
Automating Tasks With Macros
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Software Development, Programming, Testing & Implementation.
Systems Software Operating Systems.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
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.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Languages and Environments Higher Computing Unit 2 – Software Development.
1 Shawlands Academy Higher Computing Software Development Unit.
Systems Software & Operating systems
1 Software Development Topic 2 Software Development Languages and Environments.
Learning Objectives Data and Information Six Basic Operations Computer Operations Programs and Programming What is Programming? Types of Languages Levels.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Spreadsheet-Based Decision Support Systems Chapter 22:
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
11.10 Human Computer Interface www. ICT-Teacher.com.
AS Level ICT Selection and use of appropriate software: Interfaces.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
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,
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
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.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
Software Development Homework Revision Ex 2. State two tasks carried out by the project manager during the development of software Oversees whole project.
I Power Higher Computing Software Development Development Languages and Environments.
P6 BTEC Level 3 Subsidiary Diploma in ICT. Automation The end user of a spreadsheet may be proficient in using the software, but the more that you automate.
The Software Development Process
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
Chapter One An Introduction to Programming and Visual Basic.
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.
Intermediate 2 Computing Unit 2 - Software Development.
Topic 4 - Database Design Unit 1 – Database Analysis and Design Advanced Higher Information Systems St Kentigern’s Academy.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Computer Language
Computer Systems Nat 5 Computing Science
Excel Tutorial 8 Developing an Excel Application
Component 1.6.
Component 1.6.
High and low level languages
Introduction to Visual Basic 2008 Programming
Computer Systems Nat 5 Computing Science
Microsoft Access Illustrated
Computer Programming.
Chapter One: An Introduction to Programming and Visual Basic
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Programming Logic and Design Eighth Edition
Presentation transcript:

Software Development – Topic 2 Types of Programming Language

This unit covers Different types of programming languages Different types of translators Module Libraries

Types of Language Programming languages can be classified as Procedural Declarative Event driven Scripting

Procedural Language Step by step method for solving a problem Code is laid out in a sequence Design for a procedural language is called an algorithm Clear start and end points Good design will have a one to one mapping of code to algorithm

Examples of Procedural Language ALGOL Pascal True Basic C

Declarative Languages Different approach to solving the problem 1. Write down all the known facts 2. Write down all known rules 3. Perform queries to solve the problem Facts and rules are used to satisfy the query and solve the problem Good at solving logical problems and used in Artificial Intelligence

Examples of Declarative Languages PROLOG LISP A declarative language would be used to write these guessing games guess the animal game guess the tv or movie Finds the answer by pattern matching the question with the stored rules

Event Driven No specific start and end to the program Screen design with graphics, buttons, etc Code attached to object Code is similar to a procedural language but is activated in any order ie by clicking on the correct button

Visual basic is an example of an event driven language

Scripting Languages A scripting language is often provided with an applications package Using a scripting language can help to automate a series of complex actions within a package Scripting is not used for writing applications from scratch Eg – in a database like Access scripting could be used to automate the process of creating a complicated report

Macros A way to automate a task that you perform repeatedly in a package You can record each command, store and replay them with ease The macro can be played back to perform the task Tasks performed by macros are usually repetitive The sequence on instructions can be stored and executed by a single instruction

Benefits of Macros Complex commands can be reduced to one key press Macros can be set up for new users to help them with complicated tasks The range of the application package can be extended through the use of macros

Glossary Definitions Write a glossary definition for each of the following at the back of your jotter Declarative Language Procedural Language Event Driven Language Scripting Language Macro

Written Task Answer questions 12 – 15 on page 52 of How to Pass Higher Computing

Practical Task Use the macro feature in Microsoft Word to record a macro to automatically enter the name and address of a company on a blank word document Include a piece of clipart in the letterhead

Complete the following past Paper questions in your jotter 1. What is the main difference between procedural and event driven languages? 2 marks 2. Programming languages can be classed as procedural, declarative or event driven. Name the most common type of program that is written using a declarative programming language. 1 mark

Suggested Answers 1. A procedural language sets out commands in a linear way with a definite start and stop position to the program code whereas an event driven language reacts to events such as key press and mouse clicks to activate the attached code in any order 2 marks 2. artificial intelligence or expert systems 1 mark

Extended Response Past paper question which test what you have learned so far Open your past paper book at 2003 paper Q 18 Take time to study the interfaces and then think about how you would attempt to answer part a)

What you should be thinking 1. First of all think of your definition of robust Robust – can cope with errors while running and will not fail when unexpected input is entered or unexpected results are generated 1. Is interface A robust? – could invalid data be entered 2. Is interface B robust – if so why?

Use the same method to answer the rest of part a) Efficient - does not use unnecessary memory or processor time Which program is most efficient and why?

Break down your answer – to get 3 marks you must have commented on each criteria for each interface – to summarise RobustEase of Data Entry Efficiency Interface A Prone to errors as name could be mistyped Requires keyboard skills Not memory or processor intensive Interface BInvalid entries not possible as user selects from a list therefore more likely to be robust Could be used easily by inexperienced users as options are given Uses more memory/ processor power to draw menus

Past Paper 2003 – Q 18 cont’d You should also be able to answer part b) make sure you write enough to gain full marks

Suggested answers b) An event driven language uses a GUI which make it easy to create drop down menus or combo boxes Code can be easily linked to objects A procedural language would make it difficult to implement Interface B as a vast amount of code would be needed to generate the menus

Summary of What you need to know about types of programming languages Description and comparison of Procedural, declarative and event driven Description of the features and uses of scripting language (including macros) Explanation of the need and benefits of scripting languages NOTE – You must be able to use your knowledge above an apply it to a variety of problem solving scenarios

More practice on comparison of programming languages The following question was taken from a past prelim paper Using the technique for the previous question attempt to answer as comprehensively as possible The first part is worth 3 marks The second part is worth 2 marks Draw a table if it helps you

1.Describe each of these interfaces in terms of ease of data entry and robustness 2.Describe two features of an event driven language which would make it easier to implement Interface C compared to using a procedural language.

Suggested answer – part 1. Interface A: Ease of data entry – requires keyboard skills, required data value must be know by user Robustness: Invalid / inaccurate entries can be entered. Interface B: Ease of data entry: B can be used with little IT experience, values available on menu. Robustness: Valid options are shown Interface C: ease of data entry: Keyboard skills with auto complete or select from menu robustness: Valid options are shown – no invalid data 1 mark for 2 correct points against each interface

Suggested answer – part 2 Standard routines can be used for the creation of buttons linking of buttons to segments of code Easier to create a graphical user interface than with a procedural language List boxes, combo boxes or drop downs are easily created/available in an event driven language

More Past Paper Questions Use the past paper book and look at the 2000 paper – Section 2, Q2 Think about the GPPs you know of. Which one would be most suitable for creating a student tracking system? Now try to answer parts a) and b)

Suggested Solution – part a) Easier and faster to implement the program using a GPP as coding already exists to enter and edit data Could be implemented with creation of a database which would mean only data files and user interface would need to be created Tracking System would be created using tried and tested software which is error free

Suggested solution – part b) (i) A macro is a sequence of instructions which have been stored and can be executed but issuing a single instruction (ii) Macro could be used to Select data and print reports Create and update user details 3 marks

Checkup You should now complete the check up on Types of programming languages Types of programming languages

Different programming Languages use Different Translators

Translators All high level programming languages must be translated into machine code There are two types of translator Compilers Interpreters

Compiler Takes the entire program file (source code) and translates it in a single operation to object code The object code is saved as a new file - this is an executable file

Advantage of Compilers When source code has been translated once it does not need to be translated again This means The program runs faster The translator doesn’t have to be loaded into memory for the program to run

Disadvantage of Compilers Code will not run if there are any syntax errors

Interpreter Takes the whole program file (source code) and translates it one line at a time

Advantage of Interpreters Will run all or part of the code even if syntax errors are present

Disadvantages of Interpreter No object code is produced This means Translator must be present in memory every time the code is run Code is translated every time the program is run Program is slow to run

Thinking time Which type of translator do you think is more efficient and why? Remember what the definition of efficient is: Does not use more memory or processing time than is necessary

(Specimen Question paper – Section 2 – Q17 A new payroll system is being written by a software design company During the production of the payroll system the software developers use both an interpreter and a compiler. Describe when each of these translator programs are used and give a reason for its use. 4 marks

Suggested solution Interpreter - Used during the writing of the software (1 mark) May give better identification of location of error Ability to test code despite presence of errors in code (1 mark for one valid reason) Compiler - Used after the software has been completed (1 mark) Produces object code for specific chipset therefore no need for subsequent translations Object code runs without translator being present (1 mark for one valid reason)

2005 Section 2, Q 23 - Programmers use a compiler and interpreter when constructing code. 1. Why would an interpreter be used when developing software? 2 marks 2. Explain in terms of efficiency the difference between using a compiler compared with an interpreter when translating code related to the following pseudocode 1. Loop 300 times 2. ask user for name 3. store name in array 4. End loop Your answer should include both processor time and memory usage for each type of translator. 2 marks

Suggested solution As an interpreter translates the program code line by line coding errors can be pinpointed and dealt with quickly It is possible to run partial code (or code with errors in it) Easiest way to make sure you answer this type of question fully is to put what you know into a table. TranslatorMemory usageProcessor usage Interpreter – each line within the loop would need to be translated every time it is executed (300 translations - inefficient) Interpreter would need to be resident in memory (RAM) during translation which would be inefficient in terms of memory usage Instructions within the loop would need to be translated every time in the loop which would be inefficient in terms of processor time Compiler - translates all of the code before execution - the lines within the loop would only be translated once then executed 300 times – (1 translation – more efficient) Compiler – no need to load the translator into memory each time the program is run making it efficient in terms of memory usage Instructions within the loop would be translated once and run 300 times making it efficient in terms of processor time

Module Libraries A module is a section of a program A module library contains pre-written and pre-tested sections of code  Modules can be saved on backing storage to be used repeatedly

Advantages of module libraries No need to write the code Code has already been tested Modules should be documented

Glossary definition Module Library

Why use a module library? Saves time and money during Design Implementation Documentation Testing Care must be taken when using modules to ensure the correct module is used, it is error free and it fits in with the rest of your program (ie use of variables)

Past paper questions on module libraries 1. A software company has decided to make use of module libraries. Give two benefits to the software company of using module libraries. Faster implementation by using pre-written code Code is pre-tested Shorter design time Code is already documented (1 mark each for two valid benefits)

Learning Outcomes – Software development languages and environments – What you should have learned in this topic Description and comparison of procedural, declarative and event-driven languages Comparison of the functions, uses and efficiency of compilers and interpreters Description of the features and uses of scripting language (including creating and editing a macro) Explanation of the need for and benefits of scripting languages Description of the use of module libraries

Check up You should not complete the check up on Type of Languages and Translators Type of Languages and Translators

End of topic activities Complete questions 12 – 16 on page 52 Complete end of topic evaluation sheet Complete ActiVote assessmentActiVote assessment