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.

Slides:



Advertisements
Similar presentations
Programming Logic and Design Eighth Edition
Advertisements

CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
Lecture Outline 10 INFORMATION SYSTEMS SECURITY. Two types of auditors External auditor: The primary mission of the external auditors is to provide an.
Why barcode medications? Admin Rx at the Medical University of South Carolina.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
Chapter 2: Input, Processing, and Output
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #13.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming Logic and Design Fourth Edition, Introductory
BPC.1 Basic Programming Concepts
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.
Languages and Environments Higher Computing Unit 2 – Software Development.
1 Chapter 5: Names, Bindings and Scopes Lionel Williams Jr. and Victoria Yan CSci 210, Advanced Software Paradigms September 26, 2010.
CS 355 – Programming Languages
Simple Program Design Third Edition A Step-by-Step Approach
CIS Computer Programming Logic
Tutorial 11 Using and Writing Visual Basic for Applications Code
1 Chapter 6 – Repetition 6.1 Do Loops 6.2 For...Next Loops 6.3 List Boxes and Loops.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Interest Calculator Application Introducing the For...Next Repetition Statements.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
Programming Logic and Design Fifth Edition, Comprehensive
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
Computer Science 12 Mr. Jean May 2 nd, The plan: Video clip of the day Review of common errors in programs 2D Arrays.
Component 4/Unit 5-6. Instantiation With the class/design in hand, an actual automobile can be made on an assembly line (instantiated), or a patient can.
Component 4/Unit 5-4. Iteration (Repetition, Looping, Do loops) Loops are used to execute statements repetitively Loops require a conditional test that.
Health Management Information Systems Unit 4 Computerized Provider Order Entry (CPOE) Component 6/Unit41 Health IT Workforce Curriculum Version 1.0/Fall.
Programming Logic and Design Sixth Edition Chapter 5 Looping.
Health Management Information Systems
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 2.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Pseudocode An Introduction. Flowcharts were the first design tool to be widely used, but unfortunately they do not reflect some of the concepts of structured.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Component 4/Unit 5-5. Topic 5 Additional Programming Concepts Modularity and strong cohesive code Conditional and Unconditional Branching Classes Instantiation.
Computer Programming CONTENTS Introduction to Operating Systems Introduction to programming languages Introduction to perl programming language Programming.
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,
Component 4: Introduction to Information and Computer Science Overview of Programming Languages, Including Basic Programming Concepts.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Lally School of M&T Pindaro Demertzoglou 1 Computer Software.
Chapter 2: Input, Processing, and Output Starting Out with Programming Logic & Design by Tony Gaddis (with instructor modifications) 1-1.
Chapter 7 What’s Wrong with It? (Syntax and Logic Errors) Clearly Visual Basic: Programming with Visual Basic nd Edition.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
PYTHON FOR HIGH PERFORMANCE COMPUTING. OUTLINE  Compiling for performance  Native ways for performance  Generator  Examples.
Intro. to Computer Programming Eng. Nehal A. Mohamed Spring Semester-2016.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 10 Programming Fundamentals with JavaScript
Component 1.6.
Chapter 2: Input, Processing, and Output
10.3 Details of Recursion.
Software Design and Development
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Microsoft Access 2003 Illustrated Complete
Microsoft Access Illustrated
Chapter 10 Programming Fundamentals with JavaScript
Chapter 1 Introduction(1.1)
ICT Gaming Lesson 2.
Chapter 2: Input, Processing, and Output
Chapter 15 Debugging.
WJEC GCSE Computer Science
Programming Logic and Design Eighth Edition
Chapter 15 Debugging.
Presentation transcript:

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 = txtPayRate.Text 6 HoursWorked = txtHrsWrkd.Text 7 GrossPay = PayRate * HoursWorked 8 lblGrossPay.Caption = GrossPay 9 End Sub Health IT Workforce Curriculum Version 1.0/Fall Component 4/Unit 5

The Program Language Solution Storage of data (Variables, Arrays, Constants) Categories of source code Logic constructs (Sequence, Alternation, Iteration, Concurrency, Recursion) Modularity (Conditional Vs Unconditional Branching, Passing variables between modules) Strong Cohesive code/Loose coupling Classes/Objects/Attributes/Methods Component 4/Unit 53 Health IT Workforce Curriculum Version 1.0/Fall 2010

Translation Into Machine Code Source Code Executable Code/Machine Code Compiler (“Clean Compile”) Interpreter Just-In-Time (JIT) complier Component 4/Unit 54 Health IT Workforce Curriculum Version 1.0/Fall 2010

Errors Detected During Translation to Machine Code Syntax Errors –incorrect spelling of keywords –incorrect use of keywords –missing keywords Logic Errors (may need to go back to the logic design to fix) –instructions that derive the wrong results –instructions that cause the program to terminate (Abend) –instructions that are not in the proper sequence –infinite loops Component 4/Unit 55 Health IT Workforce Curriculum Version 1.0/Fall 2010

Testing Doesn’t Catch All Errors Between 1985 and 1987 a Therac-25 radiation machine exposed 6 patients to massive overdoses (approximately 100 times the intended dose). Three of the six died.[1] On Oct. 26, 1992 a computer-aided dispatch system for ambulances in London had a software failure that resulted in 46 deaths that might have been prevented if ambulances had arrived on time.[2] Component 4/Unit 56 Health IT Workforce Curriculum Version 1.0/Fall 2010

Software Cannot Catch All Errors “... Ross Koppel at the University of Pennsylvania, listed over twenty ways that CPOE made medical errors more likely to happen. In particular, medicines could be ordered for the wrong patient, sent to the wrong place, or delayed for more than 24 hours.”[3] –CPOE is Computerized physician order entry “... in failing to take seriously some by now well-recognized features of health care work, some PCISs” (patient care information systems) “are designed or implemented in such a way that error can arguably be expected to result. “[4] –PCISs are patient care information systems On the other hand... “Patients living in long-term-care facilities often have compromised kidney function. Since their kidneys cannot process medications properly, these individuals are at increased risk for adverse drug events. Using computer systems to calculate appropriate dosing of medications can improve physician drug prescribing for these patients... “[5] Component 4/Unit 57 Health IT Workforce Curriculum Version 1.0/Fall 2010

Topic IV Components of a Programming Language Storage of Data Data type Constants Categories of Source Code Logic Constructs (Sequence, Alternation, Iteration, Concurrency, Recursion) Component 4/Unit 58 Health IT Workforce Curriculum Version 1.0/Fall 2010

Storage of Data Variables/data names –Primary data (Given data. Example: Customer name) –Secondary data Accumulators (Sum of repair charges for an automobile) Counters (The number of deposit transactions at a branch of a bank during one day’s processing) Calculated (A function of two or more other values. Gross pay is equal to pay rate times the number of hours worked) Interpreted (If salesperson’s total sales exceeds $10,000 in a month they receive a 5% commission rate and if less than or equal to $10,000 they receive a 3% commission rate. The commission rate is interpreted from the total sales figure.) Component 4/Unit 59 Health IT Workforce Curriculum Version 1.0/Fall 2010

Storage of Data (continued) Memory location/Address –All variable values are stored in a memory location –Stored values are retrieved from memory using the variable name Array –Used for storing data that is repetitive (as a table of values) Examples –Exchange rates for US dollars with all other currencies in the world, Bloomberg Bloomberg –Us Government GS pay scale, US Office of Personnel MngtUS Office of Personnel Mngt Component 4/Unit 510 Health IT Workforce Curriculum Version 1.0/Fall 2010