Controlling Data within the System

Slides:



Advertisements
Similar presentations
Driving Test 1 Marking Scheme Focus on five areas to pass driving test 1.
Advertisements

Control Structures Ranga Rodrigo. Control Structures in Brief C++ or JavaEiffel if-elseif-elseif-else-end caseinspect for, while, do-whilefrom-until-loop-end.
3. S/E with Control Structures 3.1 Relational Operators and Expressions 3.2 If and if-else Statements 3.3 The Type Double 3.4 Program Design with the While.
Functions ROBERT REAVES. Functions  Interface – the formal description of what a subprogram does and how we communicate with it  Encapsulation – Hiding.
1 CS 106, Winter 2009 Class 10, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
Algorithm Design Techniques: Induction Chapter 5 (Except Sections 5.6 and 5.7)
5-1 Flow of Control Recitation-01/25/2008  CS 180  Department of Computer Science  Purdue University.
Conditions What if?. Flow of Control The order of statement execution is called the flow of control Unless specified otherwise, the order of statement.
Intro to HTML Workshop. Welcome This slideshow presentation is designed to introduce you to the basics of HTML. It is the first of three HTML workshops.
Class template Describing a generic class Instantiating classes that are type- specific version of this generic class Also are called parameterized types.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Loops We have been using loops since week 2, our void draw(){ } is a loop A few drawbacks of draw() –It is endless –There is only one draw() –It updates.
Copyright 2008 by Pearson Education 1 Midterm announcements Next week on Friday May 8 Must bring an ID Open book, open notes, closed electronics Must attend.
1 Gentle Introduction to Programming Tirgul 2: Scala “hands on” in the lab.
Wed/Fri Week 2 Functions! What are they? What do they look like in JavaScript? What are they good for? How do I use them? Some examples… Mini-Lab 1!!!
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
Week 11 DO NOW QUESTIONS. An ask turtles block is a set of instructions that is issued to every turtle. Even though computers can do things very quickly,
CSC 107 – Programming For Science. Today’s Goal  Discuss writing & using functions  How to declare them, use them, & trace them  Could write programs.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 7.1 Test-Driving the Wage Calculator Application.
1 Procedures Blocks of code which can be called from anywhere in a program Enable us to avoid needless repetition of the same code Can take parameters.
CMSC 104, Version 8/061L11Relational&LogicalOps.ppt Relational and Logical Operators Topics Relational Operators and Expressions The if Statement The if-else.
Do Now 9/13/10  Take out HW from Wednesday. Text page 8, #32-40, all Text page 8, #32-40, all  Copy HW in your planner. Text p , #14-32.
BIT 142:Programming & Data Structures in C#. What is Unit Testing? 2.
Program Errors and Debugging Week 10, Thursday Lab.
Object Oriented Programming Lecture 4: Flow Control Mustafa Emre İlal
Python uses boolean variables to evaluate conditions. The boolean values True and False are returned when an expression is compared or evaluated.
ASP-5-1 ASP Control Structures Colorado Technical University IT420 Tim Peterson.
1 Workin’ with Pointas An exercise in destroying your computer.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
The Functions and Purposes of Translators Syntax (& Semantic) Analysis.
Program Units and Data §Program Unit Structure §Declarative Part: Data Structures §Procedural Part: Statements §Procedures §Calling the procedures or.
LECTURE VII SECTION 4.12 PART 1 MODELS OF COMBINATIONAL CIRCUITS.
Georgia Institute of Technology Creating Classes part 2 Barb Ericson Georgia Institute of Technology June 2006.
CS-1010 Dr. Mark L. Hornick 1 Selection and Iteration and conditional expressions.
CSC 107 – Programming For Science. Today’s Goal  Discover best uses of structures in a program  How we can mix pointers inside structures  Assigning.
Using the Eclipse Debugger Extra Help Session (Christina Aiello)
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Quiz 3 Topics Functions – using and writing. Lists: –operators used with lists. –keywords used with lists. –BIF’s used with lists. –list methods. Loops.
Let’s say you wanted to delete this page from the newsletter template.
Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.
Fundamental Programming Fundamental Programming Data Processing and Expressions.
Setting up Categories and Grade Setup Middle Schools.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Winter 2009 Tutorial #6 Arrays Part 2, Structures, Debugger
Debugging CMSC 202.
Think What will be the output?
Barb Ericson Georgia Institute of Technology Dec 2009
Strings, Line-by-line I/O, Functions, Call-by-Reference, Call-by-Value
Controlling Data within the System
CISC101 Reminders Assn 3 due tomorrow, 7pm.
Cs212: DataStructures Computer Science Department Lab 3 : Recursion.
Using a Debugger 1-Jan-19.
EECS 111 Review 11/13/2016.
Functions, Return Values, Parameters Getters and Setters
Loops and Arrays in JavaScript
Class 4: Repetition Pretest Posttest Counting Flowchart these!
Program Flow.
Functions, Return Values, Parameters Getters and Setters
Introduction to Repetition
The structure of programming
The Psychotherapy and Counseling Workbook Creator
Introduction to Repetition
CISC101 Reminders Assignment 3 due today.
Thinking procedurally
Corresponds with Chapter 5
Scratch 7B IT 1.
Parameters and Arguments
Presentation transcript:

Controlling Data within the System

Stuff to memorise this Week "Parameters allow us to copy data from one function to another"

Some more words… Assignment Sequence Selection Repetition Proceduralisation Parameters Return Values

= Assignment Assignment is carried out by the assignment operator   The assignment operator copies data from right to left. Destination = Source

The Debugger Allows us to see the flow of code and data in real time F9 – toggle breakpoint F10 – step over F11 – step into F5 – continue Let’s look at the code you created last week

Sequence Normal flow of the code One line after another

Selection Selects different blocks of code depending on conditions If (certain condition applies) { //do this } Else Let’s look at the Delete button using the debugger

Repetition Repeat a section of code while a condition is true/false While (This there is still stuff to process) { //keep repeating the code here } Look at the function DisplayAddresses

Proceduralisation Long word to describe making functions Look at the Apply button

Parameters Allow us to copy data from one function to another (If it’s in brackets it is probably a parameter!)

Return Values The result of a function Look at the function DisplayAddresses What is a void function?