Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 1 Simple Data Types Integer: An integer.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 4 Modular Programming with Functions.
Advertisements

Working with Intrinsic Controls and ActiveX Controls
Software development process. Explanation of the iterative nature of the software development process.
Computer Programming Mr. José A. Ortiz Morris. Computer Language  Languages that the computer understands.  They are low level languages. (BINARY 1.
Modular Programming Splitting your program into functions and procedures.
Programming in python Lesson 2.
VBA Modules, Functions, Variables, and Constants
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
1 Data types, operations, and expressions Overview l Format of a Java Application l Primitive Data Types l Variable Declaration l Arithmetic Operations.
Chapter 1 Program Design
Introduction to C Programming
C++ Functions. 2 Agenda What is a function? What is a function? Types of C++ functions: Types of C++ functions: Standard functions Standard functions.
Chapter 6: Function. Scope of Variable A scope is a region of the program and broadly speaking there are three places, where variables can be declared:
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Python quick start guide
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
High Level Programming Language Constructs Higher Computing Unit 2 – Software Development.
Structured Programming Defn: This is an approach to program development that produces programs of high quality that are easy to test, debug, modify and.
Lesson 1: Introduction to ABAP OBJECTS Todd A. Boyle, Ph.D. St. Francis Xavier University.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 9 More About Strings.
A Level Computing#BristolMet Session ObjectivesU2#S10 MUST describe the difference between constants, local and global variables SHOULD explain why constants.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
Visual Basic.NET BASICS Lesson 4 Mathematical Operators.
Chapter 06 (Part I) Functions and an Introduction to Recursion.
Procedures and Functions Computing Module 1. What is modular programming? Most programs written for companies will have thousands of lines of code. Most.
Input, Output, and Processing
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
I Power Int 2 Computing Software Development High Level Language Constructs.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
Software Development Topic 3 High Level Language Constructs.
CPS120: Introduction to Computer Science Decision Making in Programs.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
CPS120: Introduction to Computer Science Functions.
Chapter 4: Subprograms Functions for Problem Solving Mr. Dave Clausen La Cañada High School.
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.
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
Chapter 3 Control Structures. The If…Then Statement The If…Then statement is a Decision statement = that executes a set of statements when a condition.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Chapter 3 Functions. 2 Overview u 3.2 Using C++ functions  Passing arguments  Header files & libraries u Writing C++ functions  Prototype  Definition.
Program Organization Sequential Execution: One line done after the other Conditional Execution: If a test is true, one section is done, otherwise another.
Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski.
31/01/ Selection If selection construct.
Variables Continued In the last session we saw how variables are objects that allow us to store values in the RAM of the computer In this session we shall.
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
Data Handling in Algorithms. Activity 1 Starter Task: Quickly complete the sheet 5mins!
Programming Constructs Notes Software Design & Development: Computational Constructs, Data Types & Structures, Algorithm Specification.
More on Variables and Subroutines. Introduction Discussion so far has dealt with self- contained subs. Subs can call other subs or functions. A module.
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.
National Diploma Unit 4 Introduction to Software Development Procedures and Functions.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Input, Output and Variables GCSE Computer Science – Python.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Third Edition by Tony Gaddis.
Chapter 15 - C++ As A "Better C"
Unit 2 Technology Systems
COMPUTATIONAL CONSTRUCTS
UNIT - V STORED PROCEDURE.
Exam 3 Review.
Function There are two types of Function User Defined Function
Introduction to Problem Solving and Control Statements
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Topics Basic String Operations String Slicing
Topics Basic String Operations String Slicing
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Topics Basic String Operations String Slicing
Presentation transcript:

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 1 Simple Data Types Integer: An integer value may be any positive or negative whole number, e.g. 24, -6. Real: A real value is taken to mean a number with a fractional part, e.g String: A string is any single or group of characters, e.g. “Peter” Boolean: A boolean value is a two-state value. It can either be True or False

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 2 Structured Data Types Array: An array is a set of data all sharing the same variable name which can be accessed by means of a subscript.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 3 Modularity Modularity is a feature of well written code and it means to divide a larger program into parts that work together to complete the program’s task. Subroutines (also known as subprograms or procedures) and functions allow programs to be written in modular form.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 4 Modularity Procedures are sections of code which do a specific set of tasks in the program, and which have been grouped separately so that they are called (brought into use) during the running of the program. A function is similar to a procedure in that it is also a section of code which does a specific task in the program, and which is called (brought into use) during the running of the program. The difference between a procedure and a function is that: a procedure produces an effect, whereas a function produces a single value.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 5 Parameters Parameters are used to pass data to/from subprograms. The statement : calculate_volume(l, b, h) means that the subprogram calculate_volume uses as its data the variables l, b and h. l,b and h are known as the actual parameters because they are the ones passed into the procedure.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 6 Parameters The procedure to do the calculation will start like this : procedure calculate_volume(length,breadth,height) length,breadth and height are known as the formal parameters because they are the ones used by the procedure.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 7 Parameters Value parameters result in a copy of the original. They cannot be passed out of the subprogram and used elsewhere. They are safer to use as the original is unaffected and so it cannot be accidentally altered. If a value parameter has its value changed within a procedure, this change of value will not be passed back out of the procedure. It will revert back to the value it had before entering the procedure.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 8 Parameters Reference parameters alter the value of the variables themselves. They can be passed out and used elsewhere but can result in accidental alteration of a variable. If a reference parameter has its value changed within a procedure, this change of value will be passed back out of the procedure.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 9 Scope of variables Local Variables Local variables are variables which exist only within a subprogram. They cannot be accessed or assigned a value except within that subprogram. Global Variables Global variables are variables which are used in any and every part of a program, including subprograms. They should always be used with care and preferably should not be used within subprograms if at all possible.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 10 Scope of variables The scope of a variable is the parts of the program it can be used in. If a variable is used throughout the whole program, both in the main program and procedures, then its scope is global. If the variable, however, can only be used within one procedure then its scope is only within that procedure.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 11 String Operations Concatenation is a process where a string is joined to another string to make a larger string, e.g. “sauce” + “pan” = “saucepan”.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 12 String Operations Substrings are parts of larger strings that can be ‘pulled out’ and used.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 13 Formatting Input and Output Languages can have a range of sophisticated input methods (ways of letting the user enter data) such as text boxes, radio buttons, spin boxes, drop down menus, etc, or it may just be limited to keyboard input. You may also be able to change the way text looks on screen by altering the colour, font, size, style and alignment of text.

Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 14 CASE statements The CASE statement allows for multiple outcomes. It removes the need for many IF…THEN…ELSE statements and is clearer for the programmer, or whoever is reading the programming code, to understand.