Unit 2 Technology Systems

Slides:



Advertisements
Similar presentations
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Advertisements

Programming Logic and Design Fourth Edition, Introductory
VBA Modules, Functions, Variables, and Constants
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Java An introduction. Example 1 public class Example1 { public static void main (String [] args) { System.out.println (“This is the first example”); int.
Modules, Hierarchy Charts, and Documentation
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
1 The First Step Learning objectives write Java programs that display text on the screen. distinguish between the eight built-in scalar types of Java;
Adding Automated Functionality to Office Applications.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Tutorial 11 Using and Writing Visual Basic for Applications Code
Concepts of Database Management Seventh Edition
A Level Computing#BristolMet Session ObjectivesU2#S10 MUST describe the difference between constants, local and global variables SHOULD explain why constants.
06/10/ Working with Data. 206/10/2015 Learning Objectives Explain the circumstances when the following might be useful: Disabling buttons and.
National Diploma Unit 4 Introduction to Software Development Data types, variables and constants.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
3 - Variables Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
I Power Int 2 Computing Software Development High Level Language Constructs.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Introduction to Programming with RAPTOR
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 1 Simple Data Types Integer: An integer.
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
I Power Higher Computing Software Development High Level Language Constructs.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 8 Arrays.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Programming with Microsoft Visual Basic th Edition
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
Data Types Mr Tottman Link. Data Types Programs need to use data for calculations and for output to various devices The best programs will always use.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Programming Right from the Start with Visual Basic .NET 1/e
CST 1101 Problem Solving Using Computers
A variable is a name for a value stored in memory.
Chapter 3 Program Design
VBA - Excel VBA is Visual Basic for Applications
IGCSE 4 Cambridge Data types and arrays Computer Science Section 2
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
Programming constructs
Introduction to Computer Science / Procedural – 67130
Data Types and Structures
JavaScript Syntax and Semantics
A simple way to organize data
JavaScript: Functions.
JavaScript.
Microsoft Access Illustrated
Microsoft Visual Basic 2005 BASICS
Topics Introduction to File Input and Output
Variables Numbers can be stored and retrieved while a program is running if they are given a home. The way that integers and decimal numbers are stored.
CS285 Introduction - Visual Basic
Introduction to Problem Solving and Control Statements
Data Types and Data Structures
Variables In today’s lesson we will look at: what a variable is
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Spreadsheets, Modelling & Databases
CIS16 Application Development and Programming using Visual Basic.net
Programming Logic and Design Fifth Edition, Comprehensive
Chapter 2: Input, Processing, and Output
Topics Introduction to File Input and Output
Variables and Constants
Presentation transcript:

Unit 2 Technology Systems BTEC First Diploma in Information and Creative Technology

Learning aims Understand how the components of technology systems work together. Understand how data flows between internal components of a computer and is processed to provide information. Understand different types of software. Lesson Aim: Understand how to write a computer program

Writing computer programs Computer programming constructs and techniques are the basic building blocks of a computer program. They are used by professional software developers to produce effective and accurate software and also help with maintaining the software https://www.youtube.com/watch?v=OWsyrnOBsJs

Programming terms ACTIVITY: Explain the following programming terms Variable Declaration Scope Subroutine Assignment Constant

Programming terms Key term Variable Memory that the programmer declares with a name which the program can use for calculations or outputs Declaration A statement that gives the name of the variable and states what type of data it can contain Scope How much of the program can use the variable Subroutine A set of instructions designed to perform an operation within a program Assignment A statement that assigns a value to a variable Constant Very similar to a variable, except that the constant is given a value in the declaration statement and that value is not changed by other parts of the program

Variables Variables are used to hold data when the program runs – a variable is like a box with a name on it, you can put data into the box, move it to another box or change it. Before a variable is used it should be declared so the program knows the name of the variable, the type of data expected to be kept there and how much of the program can use the variable.

Declaration statement Dim QuizScore As Integer In this statement, a variable named QuizScore is declared to be used to hold whole numbers (integers). The position of the declaration statement in the program defines the scope of the variable. The scope can be local or global: A local variable has the declaration inside the subroutine where it can be used. The variable is then local to that subroutine and cannot be used elsewhere in the program. A global variable has the declaration outside of all the subroutines at the start of the program. The variable can then be used anywhere in the program.

Assignment statement Some programming languages need global variable declaration statements to be in a module alongside other parts of the program, such as forms. An assignment statement in a program is where a value put inside it or where the value already held there is changed. The following assignment statement will put a value of 20 inside a variable named VAT: VAT = 20 When a value is assigned to a variable, it will be kept there and can be used by the program. A variable can hold a value that can change (vary).

Constant A constant is like a variable in that it can be referenced by a program many times, but the value of a constant is specified only once. A constant is often used to represent a value which will not change in that program, e.g. Pi () or gravity.

Input and output A program needs input to get information or control from the user. The program then uses this impact to produce the required results. Input could be a number typed into a text box that is then used by a calculation to work out a result. There are lots of other possible inputs, including form combo boxes, buttons and many other form objects.

Subroutines Programs usually have subroutines to structure the code into small sections. Each subroutine is there for a particular part of the program. Modern programs naturally structure themselves into subroutines, as a new one is created evert time an event handler is added to a control. The event handler for an object is the code that runs when that event occurred. A button will have an event handler for the click event, with code that runs when the user clicks on the button.

Annotations Software developers always annotate their code when writing programs to allow for maintenance. Annotations are comments written into the code to explain what parts of the program are there for. Annotating code is useful for a programmer who has been asked to edit or maintain code, as the original developer’s comments will help them understand how it works. Original authors can also use their own annotations as reminders if they need to maintain the code.

Data types Programs need to use data for calculations, comparisons and for output to various devices. The best programs will always use the most appropriate data types to make the most effective use of memory and to ensure that only the correct types of data are allowed to be input. A variable can be declared to have a data type, including: Character; String; integer; Real; Boolean

Activity Investigate the following data types, create a table which explains what they are and provides an example. Variable data type Explanation Typical data held in the variable Character Allows any single letter or number R 3 String Integer Real Boolean

Variable data types Variable data type Explanation Typical data held in the variable Character Allows any single letter or number R 3 String Allows any combination of letters, numbers and spaces RJ Macey Integer For whole numbers 356 Real For numbers with both whole parts and fractional parts 3.24 Boolean Can only hold true or false TRUE

Data Structures Programs allow the use of data structures with variables, including records and simple arrays. A record data structure contains fields to store information in a similar way to a database table. An array data structure is a variable with many parts, they can be thought of as tables with a number of rows and columns. The array has a number inside brackets (called a subscript) which is used to identify an item in the array that is required E.g. an array named Customer(100) that has just one column and 100 rows, so Customer(12)would be the contents of item number 12 in the list 0 to 99

Activity Go to www.Code.org Select a game and click on Java Script and Try Now!