Component 4/Unit 5-3. Data Type Alphanumeric (Character set: A-Z, 0-9 and some special characters) –Customer address, name, phone number, Customer ID,

Slides:



Advertisements
Similar presentations
Bernstein’s Conditions. Techniques to Exploit Parallelism in Sequential Programming Hierarchy of levels of parallelism: Procedure or Methods Statements.
Advertisements

Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Selection (decision) control structure Learning objective
Understanding the Three Basic Structures
1 PHP Statement Constructs Server Scripting. 5-2 Basic Statement All Statements end in a semicolon. Statements are delimited from the HTML code by enclosing.
1 Pseudocode For Program Design. 22 Rules for Pseudocode Write only one statement per line Capitalise initial keyword Indent to show hierarchy and structures.
Programming Logic and Design Seventh Edition
This set of slides is provided by the author of the textbook1 Introductory Topics (Continued) l Computer Components l Basic Control Structures l Problem.
Val Function A Function performs an action and returns a value The expression to operate upon, known as the argument, (or multiple arguments), must be.
The Programming Discipline Professor Stephen K. Kwan 2010 Things you need to know (learn) for developing large computer programs.
Program Design and Development
Visual Basic: An Object Oriented Approach 3 – Making Objects Work.
C++ for Engineers and Scientists Third Edition
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
The Programming Discipline Professor Stephen K. Kwan Things you need to know (learn) for developing large computer programs.
Adding Automated Functionality to Office Applications.
Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.
High-Level Programming Languages: C++
Simple Program Design Third Edition A Step-by-Step Approach
CIS Computer Programming Logic
Visual Basic: An Object Oriented Approach 5: Structured Programming.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
1 VBA – podstawowe reguły języka Opracowanie Janusz Górczyński wg Microsoft Help.
Chapter 4: The Selection Process in Visual Basic.
Chapter 3 Making Decisions
Overview of Programming and Problem Solving Textbook Chapter 1 1.
Component 4/Unit 5-4. Iteration (Repetition, Looping, Do loops) Loops are used to execute statements repetitively Loops require a conditional test that.
Mr. Dave Clausen1 La Cañada High School Chapter 6: Repetition Statements.
BACS 287 Programming Logic 1. BACS 287 Programming Basics There are 3 general approaches to writing programs – Unstructured – Structured – Object-oriented.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
1 Boolean Expressions to Make Comparisons Boolean expression –Represents only one of two states –Expression evaluates to either true or false Expressions.
CSE1222: Lecture 6The Ohio State University1. Common Mistakes with Conditions (1)  Consider the following code: int age(26); if (age = 18) { cout
CPS120: Introduction to Computer Science Decision Making in Programs.
sequence of execution of high-level statements
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
CS285 Visual Basic 2 Department of Computing UniS 1 Statements in Visual Basic A statement is the fundamental syntactical element of a program smallest.
Visual Basic Programming
PROBLEM SOLVING WITH LOOPS Chapter 7. Concept of Repetition Structure Logic It is a computer task, that is used for Repeating a series of instructions.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
Control Structures sequence of execution of high-level statements.
Advanced Program Design. Review  Step 1: Problem analysis and specification –Specification description of the problem’s inputs and output –Analysis generalize.
`. Lecture Overview Structure Programming Basic Control of Structure Programming Selection Logical Operations Iteration Flowchart.
Lecture 26: Reusable Methods: Enviable Sloth. Creating Function M-files User defined functions are stored as M- files To use them, they must be in the.
Review for Final (Part 2) School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 15, Friday 5/2/2003)
Component 4/Unit 5-2. VBA Code 1Dim HoursWorked As Single 2 Dim PayRate As Currency 3 Dim GrossPay As Currency 4 Private Sub cmdTotalPay_Click() 5 PayRate.
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
Data Structures & Algorithms CHAPTER 1 Introduction Ms. Manal Al-Asmari.
Lab 6 (1) Range Review, Control Logic and Loops ► Control Logic and Loops ► Exercise.
Program Structures Chapter 5. 5 Branching Allows different code to execute based on a conditional test. if, if-else, and switch statements.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Control Structures 1 The if, for, and while Statements §5.1, §5.4, & §5.5 (Several examples here; also Lab #4)
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
1 CSC103: Introduction to Computer and Programming Lecture No 9.
1. Advanced SQL Functions Procedural Constructs Triggers.
C++ for Engineers and Scientists Second Edition Chapter 4 Selection Structures.
REPETITION CONTROL STRUCTURE
Think What will be the output?
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
More Selections BIS1523 – Lecture 9.
Program Design Introduction to Computer Programming By:
Understanding the Three Basic Structures
` Structured Programming & Flowchart
Chapter 6: Repetition Statements
ICT Programming Lesson 3:
The structure of programming
Chapter 3: Selection Structures: Making Decisions
The structure of programming
Desk Checking.
Thinking procedurally
Presentation transcript:

Component 4/Unit 5-3

Data Type Alphanumeric (Character set: A-Z, 0-9 and some special characters) –Customer address, name, phone number, Customer ID, Age Alphabetic (Character set: A-Z) –Alphanumeric data type is used instead of alphabetic most of the time. Numeric (Character set: 0-9) –Account balance, Age, Count of transactions, Commission rate. Component 4/Unit 52 Health IT Workforce Curriculum Version 1.0/Fall 2010

Constants Must not change during at least one execution of the program Something whose value has been identified as not volatile –Examples Number of days in the week Number of months/periods in the business calendar State’s legal driving age Pi Component 4/Unit 53 Health IT Workforce Curriculum Version 1.0/Fall 2010

Categories of Source Code Definitions of variables, constants, and files Input and Output (I/O) operations Assignment statements Arithmetic expressions Exclusive options Repetitive execution Procedures (declaring and invoking) Component 4/Unit 54 Health IT Workforce Curriculum Version 1.0/Fall 2010

VBA Code Definitions of variables, constants, and files (1 – 3) 1 Dim HoursWorked As Single 2 Dim PayRate As Currency 3 Dim GrossPay As Currency Procedures (declaring) (4, 9) 4Private Sub cmdGrossPayMod_Click() Input and Output (I/O) operations (5 – 6) 5 PayRate = txtPayRate.Text 6 HoursWorked = txtHrsWrkd.Text Assignment statements & Arithmetic expressions (7) 7 GrossPay = PayRate * HoursWorked Input and Output (I/O) operations 8 lblGrossPay.Caption = GrossPay 9End Sub Component 4/Unit 55 Health IT Workforce Curriculum Version 1.0/Fall 2010

Logic Constructs Sequence Alternation (Selection, If-Then-Else) Iteration (Repetition, Looping, Do loops) Concurrency* Recursion* * These two constructs were said to have been proved unnecessary by two Italian Mathematicians, C. Bohm and G. Jacopini in a paper they wrote in 1966[6]. Since then there has been some controversy over that proof[7], but it can be said that for at least most applications solved on a computer that these two logic constructs, although useful and perhaps more efficient at times, are not necessary for the solutions of those computer problems. Component 4/Unit 56 Health IT Workforce Curriculum Version 1.0/Fall 2010

Sequence Statements are executed in the sequence they are written Analogous to following step by step instructions for putting something together In programming sequence can be critical for getting the correct results When designing a program the correct sequence of statements may not be apparent unless the process is looked at carefully so as to identify all the steps that are necessary Component 4/Unit 57 Health IT Workforce Curriculum Version 1.0/Fall 2010

Alternation (Selection, IF-THEN- ELSE) Breaks up sequence Provides exclusive options Comes in many forms. –Simple One-tailed –Simple Two-tailed –Case structure –Nested or Dependent –Compound Component 4/Unit 58 Health IT Workforce Curriculum Version 1.0/Fall 2010

Simple Alternation (example code is shown in pseudocode) One-tailed –Example: If light is green Go End If Two-tailed –Example: If light is green Go ElseIf light is red Stop End If Component 4/Unit 59 Health IT Workforce Curriculum Version 1.0/Fall 2010

Simple continued Two-tailed –Example: If light is green Go Else Stop End If Component 4/Unit 510 Health IT Workforce Curriculum Version 1.0/Fall 2010

Other Forms of Alternation Case Nested or dependent Compound Component 4/Unit 511 Health IT Workforce Curriculum Version 1.0/Fall 2010