Software Design and Development Languages and Environments Computing Science.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Software Development Languages and Environments. Programming languages High level languages are problem orientated contain many English words are easier.
Computers Are Your Future
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
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
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.
Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta.
Languages and Environments Higher Computing Unit 2 – Software Development.
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.
Microsoft Visual Basic 2005: Reloaded Second Edition
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
信息处理技术.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
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.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
Programming Paradigms
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
Computer Concepts 2014 Chapter 12 Computer Programming.
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,
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.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Principles of Software Development 1 Principles Of Software Design and Development Types of language / Choosing a language.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
I Power Higher Computing Software Development Development Languages and Environments.
Computing System Fundamentals 3.1 Language Translators.
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.
Chapter One An Introduction to Programming and Visual Basic.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
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.
Programming and Languages Dept. of Computer and Information Science IUPUI.
Introduction to OOP CPS235: Introduction.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Computer Languages [Computing] Computing.
Programming paradigms
Object-Orientated Programming
Visit for more Learning Resources
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
High and low level languages
Sections Basic Concepts of Programming
CSCI-235 Micro-Computer Applications
A451 Theory – 7 Programming 7A, B - Algorithms.
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Developing Applications
Computer Programming.
VISUAL BASIC.
Chapter One: An Introduction to Programming and Visual Basic
The Programming Process
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

Software Design and Development Languages and Environments Computing Science

Learning objectives Learning Objectives By the end of this topic you will be able to: ; understand the difference between high level and low level programming languages understand the difference between high level and low level programming languages know that all programming languages can be reduced to three basic control structures: sequence, selection and iteration; know that all programming languages can be reduced to three basic control structures: sequence, selection and iteration; appreciate that programming languages can be classified in a number of different ways; appreciate that programming languages can be classified in a number of different ways;

Learning objectives Learning Objectives By the end of this topic you will be able to: ; explain the differences between procedural, declarative, object- oriented and domain-specific languages; explain the differences between procedural, declarative, object- oriented and domain-specific languages; understand the difference between two types of translation software: compilers and interpreters; understand the difference between two types of translation software: compilers and interpreters; describe the tools a programmer would expect to be available in a modern programming environment. describe the tools a programmer would expect to be available in a modern programming environment.

High level and low level programming languages Low-Level languages are the languages which the computer understands directly such as machine code. They consist of binary codes. High-Level languages have to be translated into machine code before they can be understood by the computer

Control Structures: Sequence, selection and repetition Sequence: commands will be executed one after the other. Selection: execution depends on whether a condition is true or not. Iteration: a set of commands is repeated for a set number of times, often called a loop.

Programming Classification There are a large number of programming languages (more than 2000). One way to classify them is by how they are used Procedural Declarative Object Oriented Domain specific

Procedural languages Commonest type of language Programs are a sequence of commands executed in a predictable order. Earliest languages used line numbers Provide standard operations like: + - * / AND NOT OR

Procedural Languages Use Control structures like: For.. Next IF.. Then While.. Do Provide Data structures like: Real Integer String Array

Procedural Language Examples – Basic – Pascal – C – Cobol – Fortran

Declarative Languages Lets the user describe the problem to be solved in terms of facts and rules. T he user specifies what the problem is, not how to solve it. Are often used to solve logical problems Consists of a database (facts and rules) and an inference engine Have fewer variable types and control structures than procedural languages

Prolog Example - Using facts, rules and queries Suppose we want to find out whether a person drives a fast car. We start by building a set of facts and rules for our knowledge base. person(judy). - this is the fact that Judy is a person person(james). drives_car(james,ford_escort). drives_car(judy,porsche). - this is the fact that Judy drives a Porsche drives_fast_car(X):- drives_car(X,Y) and Y = "porsche"

Prolog Example - Using facts, rules and queries In this example we could ask the program to tell us whether Judy drives a fast car by typing the query: ?drives_fast_car(judy). The result would be YES since the goal is satisfied.

Prolog Example - Using facts, rules and queries If we asked: ?drives_fast_car(james) then the result would be NO as drives_car(james,Y) would evaluate Y="ford escort". This would then cause the rule drives_fast_car(james) to fail as Y does not equal "porsche" and the goal is not satisfied.

Declarative Language Examples Lisp Prolog

Need for Object Oriented Programming Size of programs makes traditional programming methods unmanageable Difficulty in controlling data flow, especially where global variables involved Even with more modern design techniques, very difficult to make changes to designs of programs once development has started Object Oriented Programming (OOP)

Objects Classes Inheritance Encapsulation Polymorphism Object oriented programming concepts

Objects are self-contained data structures that consist of properties, methods, and events. – Properties specify the data represented by an object (sometimes called states) – Methods specify an object’s behavior – Events provide communication between objects Objects

Think of the person sitting beside you They have properties (name, sex,, height etc) They have methods (sleeping, talking, reading etc) Now think of a button in a VB program It has properties (size, position, text etc) It has methods associated with it (drag, drop, resize etc) Objects

Objects are considered as a single unit with both the properties and the methods being integral unlike in traditional programming where the data (properties) is separate from the code that manipulates it (methods) Objects

A class defines a blueprint for an object. A class defines how the objects should be built and how they should behave. An object is also known as an instance of a class. Classes

Base Class H Computing pupils Sub class Claire Sub class Sam Sub class Craig Here each member of the sub-class shares common features with the base class

Inheritance is an OOP feature that allows you to develop a class once, and then reuse that code over and over as the basis of new classes. The class whose functionality is inherited is called a base class. The class that inherits the functionality is called a derived class A derived class can also define additional features that make it different from the base class. Inheritance

Properties – Passed Nat 5 Computing In S5 or S6 In School Methods Read English Write English Always does homework Prepared to bribe teacher for a good grade Inheritance Base Class H Computing pupils

Inherits all Properties and methods from the base class but can have some of her own Properties Female Methods Listens to music when writing English essays Inheritance Sub class Claire

A sub – class (or derived class) will have all the properties and methods of the base class. This makes it easy to edit large programs. If an error is found in a base (or super) class then correcting it there will also correct it in each of the sub-classes Inheritance

Objects communicate with each other using events which pass messages from one object to another. There is no direct contact with either the properties or the methods in the objects – the outside can use the properties and methods of an object but cannot change them. This is known as encapsulation Encapsulation

Two or more classes derived from a base class are said to be polymorphic. Polymorphism allows two objects to respond to the same method in different ways. In our example, when it is lunchtime, Claire goes to the Fuel Zone while Sam goes to the chip shop. Polymorphism

Domain Specific Languages Domain Specific languages are procedural languages designed for a specific task Language will have specific commands and control structures suited to this task These shorten development time and make development easier

Domain Specific Languages Examples of domain specific languages HTML – describes the layout and structure of web pages SQL – used for interrogating databases

Domain Specific Languages Scripting languages areused to add functionality to existing applications or operating systems Examples Visual Basic for Applications (VBA) – allows users to program additional features into Office programs like Excel and Access Javascript – adds interactivity to web pages

Translation software Programs written in a high level language have to be translated into machine code before a computer can execute them Two types of translators for high level languages Interpreters Compilers

Translation software Compiler: Translates the program source code into machine code all in one go. Interpreter: Translates the program source code into machine code line by line.

Why use an Interpreter? Because it translates the source code line by line, it can tell you if something is wrong with a line as you are writing it Because it translates line by line, it can be used to test parts of a program while it is still being written

Disadvantages of an Interpreter You need both the interpreter and the source code every time you run the program Because it needs to be translated every time it is run, the program runs much slower than a compiled program

Why use a Compiler? Once translated, the program can be run on any machine which understands that version of machine code. It runs faster than a program which has to be translated line by line every time it is used. No one can see or copy the original program code.

Disadvantages of a compiler You need to re-translate a program every time you make a change to it A compiler does not help you understand what is wrong with a program when you are writing and testing it

Best of both Worlds! Use an interpreter to write and test your program Use a compiler to translate the source code once it is complete and you are ready to distribute it

Programming Tools Text Editor: –Predictive typing –Search and Replace –Highlights Key-words and documentation –Indents code Debugging: –Breakpoints –Watch –Trace

Programming Tools Module and class libraries A collection of modules which can be re-used when writing software. A module will include documentation and test results. Save: –Design time –Implementation time –Testing time