OCR A Level F453: 3.3.6 High level languages 3.3.7 Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,

Slides:



Advertisements
Similar presentations
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 6 State Machine and Activity Diagrams (Based on Stevens and Pooley (2006,
Advertisements

Structures. Procedural (Imperative) Languages Procedural languages work on the basis of explicitly telling the computer ‘how to do something’; by using.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Lecture Set 3E Introduction Basic Software Development Issues 1. Notes on Software Development 2. Intro to Software Development Tools 7/31/2008 2:43PM.
Introduction to Software Engineering 7. Modeling Behaviour.
 Introduction to Programming History of programming.
Creating Computer Programs lesson 27. This lesson includes the following sections: What is a Computer Program? How Programs Solve Problems Two Approaches:
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Systems Analysis and Design 8th Edition
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Chapter 18 Object-Oriented Systems Analysis and Design Using UML
Systems Analysis and Design in a Changing World, Fourth Edition
Object Oriented System Development with VB .NET
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Essentials of interaction diagrams Lecture 23 & 24.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Computers: Tools for an Information Age
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
An Overview of Programming Logic and Design
Chapter 3 : Software Process and Other Models Juthawut Chantharamalee Curriculum of Computer Science Faculty of Science and Technology, Suan Dusit University.
Unified Modeling Language
BACS 287 Basics of Object-Oriented Programming 1.
Object-Oriented Analysis and Design
ALL students MUST be able to Identify (E) and Describe (D) the 7 most common form of UML diagrams required for OOP. MOST students WILL be able to Explain.
Introduction To System Analysis and design
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
CIS Computer Programming Logic
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
程建群 博士(Dr. Jason Cheng) 年03月
Programming Paradigms
Unified Modeling Language, Version 2.0
Systems Analysis and Design in a Changing World, Fifth Edition
Computer Concepts 2014 Chapter 12 Computer Programming.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Systems Analysis & Design 7 th Edition Chapter 5.
To navigate the slide presentation, use the navigation bar on the left OR use your right and left arrow keys. Move your mouse over the key terms throughout.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Design Jon Walker. More UML ● What is UML again?
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Systems Analysis and Design in a Changing World, Fourth Edition
HIGH-LEVEL Language Revision Guide By Tom. Declarative programming The computer is given a set of facts......And a Goal This finds all members with 2G.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 3: Introducing the UML
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Basic Characteristics of Object-Oriented Systems
Software Design and Development Languages and Environments Computing Science.
CHAPTER 6 OBJECT ANALYSIS.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Pseudocode (pronounced SOO-doh-kohd)  is a detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-styled.
Collision Theory and Logic
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Collision Theory and Logic
Computer Programming.
An Introduction to Object Orientated Programming
Software design and architecture
Chapter 5.
WJEC GCSE Computer Science
Presentation transcript:

OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented, declarative and procedural); b. explain with examples the terms object oriented, declarative and procedural as applied to high-level languages, showing an understanding of typical uses. c. discuss the concepts and, using examples, show an understanding of data encapsulation, classes and derived classes, and inheritance when referring to object-oriented languages; d. understand the purpose of the Unified Modelling Language (UML); e. interpret class, object, use case, state, sequence, activity and communication diagrams; f. create class, object, use case and communication diagrams; g. discuss the concepts and, using examples, show an understanding of backtracking, instantiation, predicate logic and satisfying goals when referring to declarative languages.

a. identify a variety of programming paradigms (low- level, object-oriented, declarative and procedural); b. explain with examples the terms object oriented, declarative and procedural as applied to high-level languages, showing an understanding of typical uses. g. discuss the concepts and, using examples, show an understanding of backtracking, instantiation, predicate logic and satisfying goals when referring to declarative languages. OCR A Level F453: High level languages

Low level languages Binary & machine code are low level languages, languages that the computer can understand without with translation. Whether assembly language is low level or high level depends on which book you read\ past paper you look at. Most of the time the OCR say that assembly language is a high level language. OCR A Level F453: High level languages

Procedural languages All the languages you have looked at so far (Python, Java script etc) are procedural languages. They describe exactly the sequence of steps required to solve a problem using sequence, selection and iteration. They also use subroutines (functions & procedures). They are sometimes called imperative languages OCR A Level F453: High level languages

Declarative languages A declarative program consists of a number of facts and rules about a given subject. Statements can be in any order (so it is easy to add new facts and rules). Executing a program means stating a goal that needs to be achieved. Declarative languages state what is required. student (James) student (Sarah) student (Katie) teacher (Mr Smith) teaches(a, b) if teacher(a) and student(b) Facts Rule OCR A Level F453: High level languages

Declarative languages student (James) student (Sarah) student (Katie) teacher (Mr Smith) teaches(a, b) if teacher(a) and student(b) Users then set their goal and receive their answer. teaches(James, Katie)? Would be FALSE student(Sarah)? Would be TRUE OCR A Level F453: High level languages

Backtracking: After finding a solution to a goal you go back and follow an alternative path to try and find another solution. Instantiation: Giving a variable a value Student(James) Predicate logic: A mathematical proof that asserts whether a given statement is TRUE or FALSE. Satisfying goals: The process of finding the answer to a goal in a declarative language. Declarative languages: Key terms OCR A Level F453: High level languages

Object Orientated languages Object Oriented languages (C++ and Java) treat all items as classes. For example a Car program might include wheel, door and engine classes. Classes contain attributes and methods. So a wheel object might have the attributes radius, colour, circumference and the method turn(). OCR A Level F453: High level languages

Objects Objects are instances of Classes. So you might have a Wheel class with the attributes and methods of all wheels. Then a front_wheel object and a back_wheel object. Both these inherit the characteristics of a wheel but can implement them in different ways. OCR A Level F453: High level languages

Object Orientated languages Wheel class: Attributes: Methods: radius: Turn() colour: circumference: front_wheel object: Attributes: radius: 50cm colour: Black circumference: 314 cm Methods: Turn() back_wheel object: Attributes: radius: 100cm colour: Black circumference: 628 cm Methods: Turn() OCR A Level F453: High level languages

c. discuss the concepts and, using examples, show an understanding of data encapsulation, classes and derived classes, and inheritance when referring to object-oriented languages; OCR A Level F453: High level languages

Object Oriented concepts Class: Describes shared attributes and methods. It acts as a template for objects which inherit attributes and methods from the class. Superclass: A class from which other classes inherit characteristics. For example a vehicle class could be a superclass of the car class. Derived classes: A class which inherits methods and attributes from a superclass. For example a car class could be derived from a vehicle class. Inheritance: Occurs when an object or class has it’s own attributes and methods as well as those from it’s superclass. Encapsulation: Means that the data in objects can only be accessed via methods from that object. OCR A Level F453: High level languages

d. understand the purpose of the Unified Modelling Language (UML); OCR A Level F453: High level languages

UML is a diagrammatic way of describing an Object Orientated program (OO). UML diagrams always represent classes in this format This is an example UML diagram showing a Vehicle class. Unified Modelling Language (UML) Class name List of attributes List of Methods Vehicle strColour: String intWheels: Integer funcGetWheels() funcMove() OCR A Level F453: High level languages

Unified Modelling Language (UML) Person strAddress: String funcGetAddress() Student intStudentID: Integer strStuName: String funcDisplayStu() Teacher intStaffID: Integer intPay: Integer funcFindPay() Superclass Derived class OCR A Level F453: High level languages

e. interpret class, object, use case, state, sequence, activity and communication diagrams; f. create class, object, use case and communication diagrams; OCR A Level F453: High level languages

Class diagram: The same as a UML diagram OCR A Level F453: High level languages

An object is an instance of a class (front_wheel). Objects can be represented as a diagram using Object Diagrams. There are just two symbols you need to know. Anonymous Objects Objects Object Diagrams :PersonChild fltHeight = 150 intAge = 14 strToy = Bear OCR A Level F453: High level languages

Have almost nothing to do with high-level programming. But are really useful for creating & designing databases. They show the functionality of a system rather than how things should be done. Use Case Diagrams System Employs Executive Worker OCR A Level F453: High level languages

Systems have users; in a UCD users are called actors. Actors are represented by stick figures, UCD has two types of Actor: Initiating actor (ie Executive) Receiving actor (ie Worker) Actions are represented on the UCD by an oval. Actors are linked to actions by lines called association lines. These show which actions are associated with which actors. Use Case Diagrams OCR A Level F453: High level languages

State diagrams are used to describe how an object should behave. Diagrams start with a black circle (called the entry point) to represent the initial state of the system. Arrows show the transition between different states of the system. The last symbol in the diagram is a white circle with a spot in it (called the exit point). State diagrams OCR A Level F453: High level languages

●The first circle is the entry point ●The arrows show the transition between states ●States are represented by rounded rectangles (Doing homework, playing a game). ●The trigger that changes the state is ‘Friend arrives’ ●The circle with a dot shows the exit point. State diagram: States of a student Doing homework Playing a game Friend arrives OCR A Level F453: High level languages

Sequence diagrams show how objects interact with each other over time. Each object has a dotted timeline underneath it. Boxes appear on the timeline whenever the object is doing something. Sequence diagrams :user:powerButton:computer funcButtonPress() funcTurnOn() funcPowerOn() funcPowerLightOn() funcPowerOn() OCR A Level F453: High level languages

Activity diagrams are just flowcharts with different symbols. Activity diagrams Start Activity Input Horizontal line: used when lots of things happen at once. End Decision Output OCR A Level F453: High level languages

Activity diagrams are just flowcharts with different symbols. Activity diagrams Go to lesson Make notes Leave Is the teacher in? Read Yes No OCR A Level F453: High level languages

Communication diagrams are used to show how different objects work together to carry out a task. Each object is represented by a rectangle. Objects are joined by arrows which show which direction information flows. These arrows are labeled to show the methods used and the order in which they occur in the communication. Communication diagrams :Secretary :Head of department :Student :Teacher 1: getReport() 2: getData() 3: getGrade() 4: sendGrade() 5:sendData() 6:sendReport() OCR A Level F453: High level languages