Buffer Whenever a read or readln is executed and you type a line of data terminated by hitting ENTER, that line, along with the CR/LF end of line marker.

Slides:



Advertisements
Similar presentations
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Advertisements

Chapter 1 An Overview of Computers and Programming Languages.
Overview of Computers & Programming Languages Chapter 1.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 2, Lecture 2.
Guide To UNIX Using Linux Third Edition
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
The Art of Programming Top-Down Design. The Art of Problem Solving The art of problem solving is the transformation of an English description of a problem.
Computer Science I CS rmaclin
1 L07SoftwareDevelopmentMethod.pptCMSC 104, Version 8/06 Software Development Method Topics l Software Development Life Cycle Reading l Section 1.4 – 1.5.
CS102 Introduction to Computer Programming
Powered by DeSiaMore1 Programming Concepts David T. Makota Department of Computing & Information Technology (CIT) The Institute of Finance Management Dar.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
หลักการโปรแกรม เพื่อแก้ปัญหาโดยใช้คอมพิวเตอร์
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
General Programming Introduction to Computing Science and Programming I.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
Copyright 1999 by Larry Fuhrer. Pascal Programming Getting Started...
CS CS Computing for Business Instructor:David Tucker GTA:Batul Mirza.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
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.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
1 Program Development l Problem definition l Problem analysis l Algorithm design l Program coding l Program testing l Program documentation.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Introduction to programming Carl Smith National Certificate Year 2 – Unit 4.
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
CSC 1010 Programming for All Lecture 2 Introduction to Python Some material based on material from Marty Stepp, Instructor, University of Washington.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
The Hashemite University Computer Engineering Department
1 More on Readln:numerical values Note: ENTER key counts sends a carriage return and a line feed to the computer definition: “white space”: space, tab,
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming using Fortran 77.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
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.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Language Basics. What is a Programming Language? “A computer, human-created language used to write instructions for a computer.” “An artificial.
Introduction to Computing Science and Programming I
Algorithms II Software Development Life-Cycle.
Component 1.6.
Engineering Problem Solving With C An Object Based Approach
Unit 3: ALGORITHMS AND FLOWCHARTS
CSCI-235 Micro-Computer Applications
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Chapter 2: Input, Processing, and Output
Algorithm and Ambiguity
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Overview of Computers & Programming Languages
Introduction to Problem Solving
Problem Solving Techniques
The Programming Process
Algorithm and Ambiguity
Programming Language Basics
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Chapter 2 – part a Brent M. Dingle Texas A&M University
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Presentation transcript:

buffer Whenever a read or readln is executed and you type a line of data terminated by hitting ENTER, that line, along with the CR/LF end of line marker is stored as characters in a series of memory locations called the input buffer. –Remember CR and LF are stored as two separate characters

Pointer While data is in the buffer, the program keeps track of the location it will read the next data item from. After read is used to read data, the pointer points to the character immediately to the right of the last character used. Readln sets the pointer to the first character in the next line.

Using Units Unit: A group of compiled procedures, along with the definitions and declarations they use. Standard Units: Predefined units that come with the Turbo Pascal compiler

Standard Units Crt: screen and keyboard procedures DOS: allows use of DOS commands in program System: (automatically included) standard functions and procedure Printer: printer functions and procedures Overlay, Graph: we will not use

Using the Standard Units in a Program PROGRAM CleartheScreen; Uses CRT; {clears the screen} BEGIN ClrScr; END. Note: If you are using a fast machine, this may produce a division by zero error. In that case you need to install a unit called newdelay. If anyone has this problem me.

The Art of Programming Top-Down Design

The Art of Problem Solving The art of problem solving is the transformation of an English description of a problem into a form that permits a mechanical solution. A straightforward example of this process is transforming an algebra word problem into a set of algebraic equations that can then be solved for the unknowns.

Software Development Method Requirements specification Analysis Design Implementation or coding Testing

Requirements Specification State the problem and gain a clear understanding of what is required for the solution. –Sounds easy but can be most difficult part –Must define the problem precisely eliminate unimportant aspects zero in on root problem

Analysis Identify input and outputs –What information should the solution provide? –What data do I have to work with? Identify data types needed

Design Develop a list of steps to solve the problem. This is called an algorithm. –First list the major steps of the problem that need to be solved (subproblems) –Now attack each of the subproblems. This is call refining the algorithm. (this process is like divide and conquer)

Implementation or Coding Notice that until now the steps are the same regardless of the programming language you are using. Translate your algorithm from pseudocode to Pascal. –Good programming style –comments