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.

Slides:



Advertisements
Similar presentations
University of Minnesota Information Technology in Healthcare Medical Industry Leadership Institute Course: MILI/PUBH 6562 Fall Semester B, 2013 David.
Advertisements

Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 1.
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
CS0004: Introduction to Programming Repetition – Do Loops.
CS 355 – Programming Languages
Introduction to Information and Computer Science Computer Programming Lecture e This material (Comp4_Unit5e) was developed by Oregon Health and Science.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Chapter 1 The Systems Development Environment 1.1 Modern Systems Analysis and Design Third Edition.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
Chapter 3 Planning Your Solution
1414 CHAPTER PROGRAMMING AND LANGUAGES. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved Competencies Describe the six steps of programming.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Fundamentals of Python: From First Programs Through Data Structures
1 Introduction Chapter 1. 2 Key Ideas Many failed systems were abandoned because analysts tried to build wonderful systems without understanding the organization.
Fundamentals of Python: First Programs
Simple Program Design Third Edition A Step-by-Step Approach
Introduction to Information and Computer Science Information Systems Lecture b This material (Comp4_Unit9b) was developed by OHSU, funded by the Department.
Introduction to Object-Oriented Programming
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
Introduction to Information and Computer Science Computer Programming Lecture b This material (Comp4_Unit5b), was developed by Oregon Health and Science.
Component 4/Unit 5-4. Iteration (Repetition, Looping, Do loops) Loops are used to execute statements repetitively Loops require a conditional test that.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
Working with Health IT Systems Lecture a This material (Comp7_Unit6a) was developed by Johns Hopkins University, funded by the Department of Health and.
D. M. Akbar Hussain: Department of Software & Media Technology 1 Compiler is tool: which translate notations from one system to another, usually from source.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 3 This material was developed by Oregon Health & Science.
Health Management Information Systems
Data Structures and Algorithms Introduction to Algorithms M. B. Fayek CUFE 2006.
The Central Processing Unit (CPU) and the Machine Cycle.
Component 4: Introduction to Information and Computer Science Unit 9: Components and Development of Large Scale Systems Lecture 3 This material was developed.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
Introduction to Information and Computer Science Information Systems Lecture d This material (Comp4_Unit9d) was developed by OHSU, funded by the Department.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 2.
Computer Science 210 Computer Organization Course Introduction.
Component 3-Terminology in Healthcare and Public Health Settings Unit 16-Definitions and Concepts in the EHR This material was developed by The University.
Terminology in Health Care and Public Health Settings Unit 15 Overview / Introduction to the EHR.
Component 4/Unit 5-5. Topic 5 Additional Programming Concepts Modularity and strong cohesive code Conditional and Unconditional Branching Classes Instantiation.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Introduction to Information and Computer Science
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
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.
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.
Component 10/Unit 2 Slide 1 Health IT Workforce Curriculum Version 1.0/Falll 2010 Fundamentals of Health Workflow Process Analysis and Redesign Unit
Software Development Introduction
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Fourth Quarter.  Involves loops or cycles ◦ Loops: means that a process may be repeated as long as certain condition remains true or remains false. ◦
Component 1: Introduction to Health Care and Public Health in the U.S. 1.9: Unit 9: The evolution and reform of healthcare in the US 1.9c: Quality Indicators.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
Introduction to Computer Programming using Fortran 77.
Health Management Information Systems Clinical Decision Support Systems Lecture b This material Comp6_Unit5b was developed by Duke University, funded by.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Information Systems Development
Chapter 1 The Systems Development Environment
ICS 3UI - Introduction to Computer Science
Chapter 1 The Systems Development Environment
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
Introduction to Computer Science
MatLab Programming By Kishan Kathiriya.
Chapter 1 The Systems Development Environment
Information Systems Development
CS170 Computer Organization and Architecture I
2018, Fall Pusan National University Ki-Joune Li
Algorithm and Ambiguity
Component 11 Unit 7: Building Order Sets
Chapter 1 The Systems Development Environment
Computer Science 210 Computer Organization
Presentation transcript:

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 be checked into the hospital. Instantiation is the word used for the creation of an object of the class. In programming too, objects are instantiated in the program when they are created or defined. Component 4/Unit 52 Health IT Workforce Curriculum Version 1.0/Fall 2010

Objects, Attributes and Methods Objects are instances of a class Objects have specific attribute values (descriptors of the object) Objects have methods (things that they can do) Component 4/Unit 53 Health IT Workforce Curriculum Version 1.0/Fall 2010

An Example Object UML diagram for a car produced from an assembly line (showing data for a specific car) Component 4/Unit 54 Health IT Workforce Curriculum Version 1.0/Fall 2010

An Example Object UML diagram for a patient in a hospital (showing data for a specific patient) Component 4/Unit 55 Health IT Workforce Curriculum Version 1.0/Fall 2010

One More UML Example Health IT Workforce Curriculum Version 1.0/Fall Component 4/Unit 5

Example Object Code ‘This is the code for the application Option Explicit Private Sub cmdSumDBandCR_Click() Call FindTranFile Call ProcessTrans Call ShutTranFileDown End Sub Private Sub ProcessTrans() Call Heading Call DetermineTotals Call ReportResults End Sub Private Sub Heading() lblReport.Caption = "Tran type Tran amount DB count DB total CR count CR total" End Sub Private Sub DetermineTotals() Do Until EOF(1) Call GetData Call DetermineTranType Call ReportResults Loop End Sub Private Sub ReportResults() lblReport.Caption = lblReport.Caption & vbNewLine & _ " " & TranType & " " & _ TranAmt & " " & _ CountOfDBs & " " & _ DBTotal & " " & _ CountOfCRs & " " & _ CRTotal End Sub ‘This is the code for the object. Public TranType As String Public TranAmt As Currency Public DebitAmt As Currency Public CreditAmt As Currency Public DBTotal As Currency Public CRTotal As Currency Public CountOfDBs As Integer Public CountOfCRs As Integer Public Sub FindTranFile() Open ActiveDocument.Path & "/TranFile.txt" For Input As #1 End Sub Public Sub GetData() Input #1, TranType, TranAmt End Sub Public Sub DetermineTranType() If TranType = "DB" Then DebitAmt = TranAmt DBTotal = DBTotal + DebitAmt CountOfDBs = CountOfDBs + 1 ElseIf TranType = "CR" Then CreditAmt = TranAmt CRTotal = CRTotal + CreditAmt CountOfCRs = CountOfCRs + 1 End If End Sub Public Sub ShutTranFileDown() Close #1 End Sub Health IT Workforce Curriculum Version 1.0/Fall Component 4/Unit 5

Summary Programming languages provide instructions for the computer hardware so that it knows what to do. Programming languages vary from machine code to many higher levels. All higher levels must be translated into machine code. Structured solutions for computer problems are best when they are designed using some formal design tool. Designing software is but one of multiple steps in the creation of a program in what is called the Software Development Life Cycle (SDLC). Component 4/Unit 58 Health IT Workforce Curriculum Version 1.0/Fall 2010

Summary Continued Software errors can cause horrendous problems especially in the health care field. There are three commonly used logic constructs in programming (sequence, alternation and iteration). A Program’s code is often broken up into modules, creating as much strong cohesive code as possible so that the code can migrate to become part of an object. From a class, objects can be instantiated that contain attributes and methods providing storage locations and program code to many other applications. Component 4/Unit 59 Health IT Workforce Curriculum Version 1.0/Fall 2010

Bibliography 1.Levenson N, Turner CS. An Investigation of the Therac-25 Accidents. IEEE Computer July;26(7): Wikipedia: The Free Encyclopedia. London Ambulance Service [homepage on the Internet]. Wikimedia Foundation, Inc.; [updated 2010 May 11; cited 2010 June 30]. Available from: Baker ML. Health Tech Advance Can Lead to Errors [homepage on the Internet]. 28 East 28th Street New York, NY: eWeek; [updated 2005 March 8; cited 2010 June 30]. Available from: Ash SA, Berg M, Coiera E. Some Unintended consequences of Information Technology in Health Care: The Nature of Patient Care Information System-related Errors. JAMIA Oct 27;11(2): U.S. Department of Health and Human Services, Agency for Healthcare Research and quality. Elderly/Long-Term Care: Computerized Decision Making Systems Improve Physician Prescribing for Long-Term-Care Residents [homepage on the Internet]. Rockville, MD. U.S. Gov. [updated 2010 Jan; cited 2010 June 30]. Available from: 6Allison C. Code Capsules: Control Structures [homepage on the Internet]. Cyberspace: Fresh Sources; [updated 1994 June; cited 2010 June 30]. Available from: 7Kozen D, Tseng WD, Department of Computer Science, Cornell Univ. The Böhm-Jacopini Theorem is False, Propositionally [homepage on the Internet]. Ithaca, New York: Pub. By Authors; [updated 2008 May 21; cited 2010 June 30]. Available from: Component 4/Unit 510 Health IT Workforce Curriculum Version 1.0/Fall 2010