Lecture 11: 10/1/2002CS149D Fall 20021 CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.

Slides:



Advertisements
Similar presentations
CS101: Introduction to Computer programming
Advertisements

1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
Computers Are Your Future
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
Overview. What is Computer Programming? It is the process of planning a sequence of steps (called instructions) for a computer to follow. 2 STEP 1 STEP.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Programming and Languages.
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Computers: Tools for an Information Age
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Programming and Languages Chapter Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design,
McGraw-Hill Technology Education © 2006 by the McGraw-Hill Companies, Inc. All rights reserved CHAPTER PROGRAMMING AND LANGUAGES.
1414 CHAPTER PROGRAMMING AND LANGUAGES. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved Competencies Describe the six steps of programming.
ALGORITHMS CSC 171 LECTURE 1. What is “Computer Science”? What is “Science”? What is a “Computer”? What is “Computation”?
PRE-PROGRAMMING PHASE
Programming Concepts and Languages Chapter 12 – Computers: Understanding Technology, 3 rd edition 1November
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages Updated by: Dr\Ali-Alnajjar.
Program development & programming languages Chapter 13.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
CHAPTER 1 Overview of Programming and Problem Solving.
Chapter 1: Preliminaries. Objectives In this chapter, you will learn about: Unit analysis Exponential and scientific notations Software development Algorithms.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
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.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Copyright © Prentice Hall Programming and Languages Chapter 14 Telling the Computer What to Do.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Programming and Languages
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 2.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Chapter 1 Introduction 2nd Semester H
CSCI-235 Micro-Computer Applications
Computer Programming.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Algorithm and Ambiguity
Assembler, Compiler, Interpreter
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
The Programming Process
Assembler, Compiler, Interpreter
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
CS105 Introduction to Computer Concepts Intro to programming
Presentation transcript:

Lecture 11: 10/1/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture 11: 10/1/2002

CS149D Fall Outline Skip section 3.6 and 3.7 Overview of Computer Programming Process Overview of algorithms and programming languages Should cover section 4.1 from Brookshear Text, and sections from Etter Text

Lecture 11: 10/1/2002CS149D Fall Computer Programming Computer program A sequence of instructions to be performed by a computer Computer programming The process of planning a sequence of steps for a computer to follow Programming Process Problem-solving phase Implementation phase Maintenance phase

Lecture 11: 10/1/2002CS149D Fall Programming Process 1/3 Problem-solving phase Analysis and specification ( understand and define problem, and what is expected of solution) General solution (algorithm: a logical sequence of steps that solves the problem) Verification (Follow steps to make sure solution solves the problem) Implementation phase Concrete solution (Program in a Programming language) Testing (make sure the program produces the desired results) Maintenance phase Use Program Maintain Program (meet changing requirements)

Lecture 11: 10/1/2002CS149D Fall Programming Process 2/3 Analysis and Specification General solution (algorithm) Verification Concrete solution (Program) Testing Maintenance Phase In “Programming and Problem Solving with C++”, 3 rd Edition, Jones and Bartlett Publishers, 2002 Documentation: writing program documentation, and user manuals

Lecture 11: 10/1/2002CS149D Fall Programming Process 3/3 How about we take a shortcut and start the programming process by the implementation phase? Costly shortcut Develop a general solution (algorithm) first Think first and code later!

Lecture 11: 10/1/2002CS149D Fall Algorithm 1/3 Algorithm An ordered set of unambiguous executable steps, defining a terminating process A step-by-step procedure for solving a problem in a finite amount of time 1.Make a list of all positive integers 2.Arrange the list in descending order (from largest to smallest) 3.Extract the first integer from the list What are the problems with these instructions?

Lecture 11: 10/1/2002CS149D Fall Algorithm 2/3 Difference between an algorithm and its representation Analogous to difference between a story and a book An algorithm is abstract and can be represented in many ways Algorithm for converting from Celsius to Fahrenheit can be represented as 1. F = (9/5) C + 32 (algebraic equation) 2. “ Multiply the temperature reading in Celsius by 9/5 and then add 32 to the product” An algorithm can be represented using some sort of language 1950s, 1960s  represented using flowcharts pseudocode (precisely defined textual structures)

Lecture 11: 10/1/2002CS149D Fall Algorithm 3/3 An algorithm for starting the car 1.Insert the key in ignition 2.Make sure transmission is in Park (or Neutral) 3.Depress the gas pedal 4.Turn key to start position 5.If engine starts within six seconds, release key to ignition position 6.If engine does not start in six seconds, release key and gas pedal, wait ten seconds, and repeat steps 3 through 6, but not more than five times 7.If the car does not start, call the garage

Lecture 11: 10/1/2002CS149D Fall Programming Language 1/3 A set of rules, symbols, and special words used to construct a computer program. There are rules for syntax (grammar) and semantics (meaning) Machine language Binary-coded instructions Closely coupled with design of computer hardware Assembly language Low-level programming language in which a mnemonic is used to represent each of the machine language instructions We have seen an example in chapter 2 from Brookshear Text We need an assembler Translate an assembly language program into machine code

Lecture 11: 10/1/2002CS149D Fall Programming Language 2/3 High-level language closer to English and other natural languages C++, Java, C, Fortran, Ada, Pascal, COBOL, BASIC We need a compiler Translate a high-level language program into machine code Source program Program written in a high-level language Object program Machine language version of a source program Difference between compilation and execution of a program

Lecture 11: 10/1/2002CS149D Fall Programming Language 3/3 Some programming languages are translated by an interpreter (some versions of BASIC) Interpreter translates and executes each instruction in the source program Java uses both a compiler and interpreter