Mastering Abstraction NATURE OF ABSTRACTION NEED FOR ABSTRACTION DIFFERENCES BETWEEN ABSTRACTION AND REALITY DEVISING ABSTRACT MODES FOR DIFFERENT SITUATIONS.

Slides:



Advertisements
Similar presentations
Copyright © 2014 ICT Inspires Ltd. All Rights Reserved. ICT (Computing) Subject Leader Course Session 2: Broader.
Advertisements

COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Algorithms and Problem Solving
Chapter 2 - Problem Solving
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
PROCESS MODELING Transform Description. A model is a representation of reality. Just as a picture is worth a thousand words, most models are pictorial.
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Program Design
Course Instructor: Aisha Azeem
Introduction to Computers and Programming
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
PROCESS MODELING Chapter 8 - Process Modeling
Modelling information systems
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Simple Program Design Third Edition A Step-by-Step Approach
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
University of Toronto Department of Computer Science CSC444 Lec05- 1 Lecture 5: Decomposition and Abstraction Decomposition When to decompose Identifying.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
SOFTWARE DESIGN.
By the end of this session you should be able to...
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Structured Analysis.
ALGORITHM CHAPTER 8. Chapter Outlines and Objectives  Define an algorithm and relate it to problem solving.  Define three construct and describe their.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Design Concepts By Deepika Chaudhary.
User Interfaces 4 BTECH: IT WIKI PAGE:
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
2.1 Elements of Computational thinking
THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS.
Computational Thinking
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Algorithms and Pseudocode
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.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Computer Systems Architecture Edited by Original lecture by Ian Sunley Areas: Computer users Basic topics What is a computer?
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Algorithms and Flowcharts
Computational Thinking
AP CSP: Creating Functions & Top-Down Design
Topic: Introduction to Computing Science and Programming + Algorithm
Software Testing.
Problem Solving How do we attack a large problem?
Unified Modeling Language
BTEC NCF Dip in Comp: Unit 01 Principles of Computer Science Lesson 01 – Computational Thinking Mr C Johnston.
Introduction To Flowcharting
Introduction to Algorithm – part 1
Computer Programming.
Theory of Computation Turing Machines.
Computational Thinking for KS3
Chapter 0 : Introduction to Object Oriented Design
Object Orientated Programming
Algorithms.
Mastering Abstraction
CompSci 1: Principles of Computer Science Lecture 1 Course Overview
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Applying Use Cases (Chapters 25,26)
Basic Concepts of Algorithm
WJEC GCSE Computer Science
Computational Thinking (How to think like a computer scientist)
Presentation transcript:

Mastering Abstraction NATURE OF ABSTRACTION NEED FOR ABSTRACTION DIFFERENCES BETWEEN ABSTRACTION AND REALITY DEVISING ABSTRACT MODES FOR DIFFERENT SITUATIONS MODELLING DECOMPOSITION ALGORITHMS: PSEUDOCODE AND FLOWCHARTS EXAM QUESTIONS AND ANSWERS

Did you know? Plato was a famous ancient Greek philosopher. He postulated that all the objects that are seen in this world are not real, but literally mimic the real Forms. These Forms are the essences of various objects: they are that without which a thing would not be the kind of thing it is. For example, there are countless tables in the world but the Form of tableness is at the core; it is the essence of all of them

Plato’s theory of forms A Form is an objective "blueprint" of perfection. The Forms are perfect themselves because they are unchanging. In the Phaedrus the Forms are in a "place beyond heaven" and in the Republic the sensible world is contrasted with the intelligible realm in the famous Allegory of the Cave. One interpretation of this is to say that Plato was suggesting that everything on this earth is just a instantiation of its respective true and perfect “form

…and what is Abstraction Abstraction is one of the four cornerstones of Computer Science. It involves filtering out – essentially, ignoring - the characteristics that we don't need in order to concentrate on those that we do. Abstraction is the process of filtering out – ignoring - the characteristics of patterns that we don't need in order to concentrate on those that we do. It is also the filtering out of specific details. From this we create a representation (idea) of what we are trying to solve. Any idea what these two objects are?

Chairs and the concept of abstraction Imagine you were given a task: to draw a series of chairs … You’ll note that though they take different forms, chairs all have certain general characteristics that are common to all (legs, back, seat type etc.) In addition, each chair has specific characteristics, colour (black legs), type of seat =hard/soft; material = leather/fabric. These details are known as specifics.

Abstraction: Drawing a basic chair In order to draw a basic chair, we do need to know that it has legs (of some sort), a seat, a back, etc. (if it didn’t have a back I suppose it would be a stool) These general characteristics are relevant and essential We don’t however, need to know what fabric the chair is made of, or what colour the legs are. We don’t even need to know what the size of the chair is. These specifics can be filtered out. From our basics (general characteristics) we can build a basic idea of a chair i.e. what a chair basically looks like. We would then be able to describe how to draw a basic cat. This filtering out of the irrelevant details is ABSTRACTION. ? ?

Need for Abstraction So as we’ve been learning, Abstraction allows us to create a general idea of what the problem is and how to solve it. The process instructs us to remove all specific detail, and any patterns that will not help us solve our problem. This helps us form our idea of the problem. This idea is known as a ‘model’. If we don’t abstract we may end up with the wrong solution to the problem we are trying to solve. In the chair example, if we didn’t abstract we might think that all chairs are gold and velvety and look like the one in the picture! We know however, that although chairs have a colour and size, not all chairs are as grand as the one shown. In this case, abstraction has helped us to form a clearer model of a chair

How to abstract So, abstraction is the gathering of general characteristics that we need and filtering out unnecessary details. I don’t know if you like Chocolate, but if you do, and you’ve ever tried making some, there are some general things that you always need to know: For example, here are some general essentials 1.Chocolate needs ingredients 2.Each ingredient needs a specified quantity 3.Making chocolate needs timings For example, here are some general essentials 1.Chocolate needs ingredients 2.Each ingredient needs a specified quantity 3.Making chocolate needs timings

How to abstract Recap: abstraction is the gathering of general characterises that we need and filtering out unnecessary details. For example: 1.Chocolate needs ingredients 2.Each ingredient needs a specified quantity 3.Making chocolate needs timings For example: 1.Chocolate needs ingredients 2.Each ingredient needs a specified quantity 3.Making chocolate needs timings When abstracting we can remove specifics and keep the relevant patterns - essentials General PatternsSpecific Details We need to know chocolate has ingredients We need to know the quantities required We need to know the timings required We don’t need to know what the ingredients are We don’t need to know specific quantities …. We don’t need to know the specifics of timings

Creating a Model A Model is a general or essential/basic idea of the problem that we are hoping to solve. Take elephants, a model elephant would not be an indian elephant will small ears, because a model has to represent ALL elephants. Once we have a model in place, we can design an algorithm to solve the problem! From our model of elephants, we should be able to learn about what any elephant might look like in the real world. An algorithm is just a sequence of instructions that can be used to solve a problem. General: Trunk Trunk General: Ears Ears The sizes of the ears or trunk won’t be needed for our model

Pseudocode Pseudo means false! Pseudocode literally means ‘false’ code or ‘fake’ code. Pseudocode is not a programming language – it is just a way of writing code in simple statements that do not use programming language specific syntax. Dim x as integer = 10 Code Pseudocode DECLARE x as an integer GIVE x the value of 10 Dim age as integer Textbox1.text = age Dim age as integer Textbox1.text = age DECLARE age as integer INPUT age into textbox DECLARE age as integer INPUT age into textbox Pseudocode should not be specific to any language. It’s a bit like writing steps of instructions in plain English (or other languages) without worrying about the syntax

Flowcharts A flowchart is a diagram that represents a set of instructions (step by step) – visual! Flowcharts have a range of standard symbols to represent different instructions in use Start/Stop Process Decision Manual Input *indicates a jump from one point in the sequence to another *connects symbols. Shows direction of flow of the instructions Output

Output “Access Denied” Here’s a very simple flow chart! Start/Stop If age >16 Enter age into textbox Pseudocode DECLARE age as integer INPUT age into textbox IF age > 16 OUTPUT “Welcome” Output “Welcome” ELSE OUTPUT “Access denied” Yes No

Decomposition You may have heard this word in Biology – in reference to decomposing food or garbage … In computing, it refers to solving a problem by decomposing it into sub-problems (sub-modules) You would then compose the solutions together to solve the original problem. Consider this problem: MAKE BREAKFAST In reality, this has lots of sub tasks… Make Tea Make Tea Make Toast Make Toast Milk Cow Milk Cow Boil Egg Boil Egg

Decomposition These tasks can be further decomposed …for instance boiling milk may involve a series of steps: 1.Milk Cow 2.Transfer milk to boiling pan 3.Put on the gas 4.Boil Milk These tasks can be further decomposed …for instance boiling milk may involve a series of steps: 1.Milk Cow 2.Transfer milk to boiling pan 3.Put on the gas 4.Boil Milk Boil Milk Boil Milk Milk cow Transfer Milk Put on the gas Boil Milk… The process is known as recursive as each sub task is probably capable of further decomposition and so on and so on until you arrive at the smallest possible sub task. Organisation of data can also be decomposed. E.g. data representing the population of a country can be decomposed into entities such as individuals, occupations, places of residence, etc.

Final Notes on Abstraction The process of abstraction takes many specific forms, such as modelling, decomposing (breaking down a big problem), and generalising. In each case, complexity is dealt with by hiding complicated details behind a simple abstraction, or model, of the situation. Example of a Model: Have you ever seen a London Underground map? Well, that is a simple model of a complex reality — but it is a model that contains precisely the information necessary to plan a route from one station to another. *Remember that Computational thinking values elegance, simplicity and modularity over complexity Example of a Model: Have you ever seen a London Underground map? Well, that is a simple model of a complex reality — but it is a model that contains precisely the information necessary to plan a route from one station to another. *Remember that Computational thinking values elegance, simplicity and modularity over complexity

Final Notes on Abstraction Abstraction is the main mechanism used to deal with complexity and enabling computerisation. Abstraction is both presenting a simplified version through information hiding and making an analysis to identify the essence or essential features. Aspects of abstraction include: Abstraction is the main mechanism used to deal with complexity and enabling computerisation. Abstraction is both presenting a simplified version through information hiding and making an analysis to identify the essence or essential features. Aspects of abstraction include: Computer hardware consists of components (black boxes) interacting through interfaces (a network cable, a CPU socket, a SATA disk interface). Computer software is built from layers of abstraction. For example, a procedure (or method, or library) implements a specification, but hides its implementation; an operating system provides facilities to programs but hides the complex implementation; a database implements SQL queries, but hides how the data is stored. Scientists, industrialists, engineers, and business people all use computers to simulate and model the real world, by abstracting away unnecessary detail and using a computer program to simulate (what they hope is) the essence of the problem Designing and hiding a complicated implementation (“how it works”) behind an interface (“what it does”). Representing or modelling through visualisations, metaphors or prose the essential features without the confusion of the detail. The process of categorisation or classification that breaks down a complex system into a systematic analysis or representation.

Examples of Modelling Modelling is the process of developing a representation of a real world issue, system, or situation, that captures the aspects of the situation that are important for a particular purpose, while omitting everything else Further Examples: Storyboards for animations Mass, velocity and position of planets orbiting one another

Different purposes need different models Example: a geographical map of the Underground is more appropriate for computing travel times than the well-known topological Underground map; a network of nodes and edges can be represented as a picture, or as a table of numbers. A particular situation may need more than one model. Example: a web page has a structural model (headings, lists, paragraphs), and a style model (how a heading is displayed, how lists are displayed). A browser combines information from both models as it renders the web page. A particular situation may need more than one model. Example: a web page has a structural model (headings, lists, paragraphs), and a style model (how a heading is displayed, how lists are displayed). A browser combines information from both models as it renders the web page.

Questions on Abstraction

Question

Answer

Question

Answer

Question

Answer

Question

Answer