The Anatomy of a Computer Program Unit 3. Programs are Directions  A computer carries out the instructions in a program, line by line, exactly as they.

Slides:



Advertisements
Similar presentations
Chapter 1 - VB 2008 by Schneider1 Chapter 1 - An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Windows, Folders, and.
Advertisements

Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Programming Types of Testing.
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 2 - Problem Solving
Chapter 2- Visual Basic Schneider
Program Flow Charting How to tackle the beginning stage a program design.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
Chapter 1 Program Design
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.
Chapter 3 Planning Your Solution
BPC.1 Basic Programming Concepts
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Introduction to Systems Analysis and Design Trisha Cummings.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.
1 Shawlands Academy Higher Computing Software Development Unit.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Simple Program Design Third Edition A Step-by-Step Approach
Programming Translators.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Twelfth Edition.
Programming Lifecycle
Program Development Life Cycle (PDLC)
Testing E001 Access to Computing: Programming. 2 Introduction This presentation is designed to show you the importance of testing, and how it is used.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
CPS120 Introduction to Computer Programming The Programming Process.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
The Programming Process Define the problem* Make or buy software? Design the program * Code (write) the program Test (debug) the program Document the.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
Review, Pseudocode, Flow Charting, and Storyboarding.
The Software Development Process
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
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.
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
5.01 Understand Different Types of Programming Errors
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
PROGRAMMING. Computer Programs  A series of instructions to the computer  pre-written/packaged/off-the-shelf, or  custom made  There are 6 steps to.
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.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
ICS 3UI - Introduction to Computer Science
5.01 Understand Different Types of Programming Errors
Chapter 2- Visual Basic Schneider
Understand the Programming Process
5.01 Understand Different Types of Programming Errors
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
Understand the Programming Process
Presentation transcript:

The Anatomy of a Computer Program Unit 3

Programs are Directions  A computer carries out the instructions in a program, line by line, exactly as they are given.  The word detailed is crucial to making the computer follow the program directions.  The details of the program’s instructions are the key to programming.  Caveman/VCR analogy Pretend a caveman is transported by a time machine to your doorstep. The caveman is anxious to try all the new things he sees. He buys a new BlueRay player so he can watch his first video. Write step by step instructions for the caveman.

Instructions These are better instructions but they still lack most of the required details and assume a lot of prior knowledge: The VCR is in the box that came with these instructions. You will use this VCR to watch the movie. Remove the VCR from the box. Place the VCR on a table close to the television. Connect the VCR cable to the connection on the back of the television. Plug the VCR in to a power supply on the wall. Press the Power button on the TV remote control. Press the Power button on the front of the VCR. Insert the tape into the opening on the front of the VCR. Press the Play button on the VCR.

The Program Development Cycle  Proper design is absolutely critical to a successful program.  The term systems analysis and design is the name given to the practice of analyzing a problem and then designing a program from that analysis.

Steps in the Program Development Cycle 1.Analyze = Define the problem. 1.Have a clear idea of what the input will be and what the desired output should look like. 2.Design - Plan the solution to the problem. 1.Develop the algorithm and test the algorithm 3.Choose the language or interface 1.What language is used and how output will be displayed. 4.Write the code 5.Test and debug 1.test for logic and syntax errors 6.Document 1.Write comments within the code to clarify the purpose of various sections of the code. 2.Provide external documentation for the program that could include instruction manuals, help files, etc

Testing a program Desk testing – Checking the program using as many different scenarios to try to find errors in the code. Try to make it FAIL! Beta Testing - A group of users is set up to try the program. The more beta testers you find to test the program, the better the chance errors will be found. More software developers are inviting the public to help beta test products. Many beta versions are available for download. Parallel Testing - use the new program while at the same time continuing to use an old program.

Types of Errors Example – There are two errrors in this statement. Error #1 – errrors Error #2 – There aren’t actually 2 errors. There is only 1 1.Syntax Errors - Often misspelled programming language commands and grammatical problems with the programming language. 2.Logic Errors - the program is told to do something that is not really what should be done. 3.Runtime Errors - almost always caused by logic mistakes. programmer fails to predict a problem and fails to handle it when it occurs.

Top-down Design  Top-down design is the process of taking the overall problem and breaking it down into more and more precise details. 1.Determine the overall goal. 2.Break the overall goal into 2 or 3 parts. 3.Repeat step 2 for each part in #2 until you cannot break each of the parts down any further. This process is used to develop the program algorithm.

Top-down Design Overall goal brokendown intomore detail andmore asyoumovedownthroughthelevels

Examples of Top-down