An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.

Slides:



Advertisements
Similar presentations
Computers Are Your Future
Advertisements

Introduction to Programming
زبانهای برنامه سازی برنامه سازی پیشرفته ارائه دهنده دکتر سيد امين حسيني E.mail: Home page:
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
PROGRAMMING Introduction To Programming Definition Types Of Programming Languages Programming Language Paradigm Translator
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Computers: Tools for an Information Age
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Intro to Programming CST JavaScript. Objectives Define software Identify the different types of software Differentiate the different types of programming.
Programming Concepts and Languages Chapter 12 – Computers: Understanding Technology, 3 rd edition 1November
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Chapter 1 An Overview of Computers and Programming Languages.
There are only 10 types of people in the world, those who understand binary and those who don't.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Microsoft Visual Basic 2005: Reloaded Second Edition
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Computer Programming TCP1224 Chapter 2 Beginning the Problem-Solving Process.
An Introduction to Programming with C++ Sixth Edition
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Chapter 15 Program Development and Programming Languages.
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
1 Week 1: The History of Computing: Software READING: Chapter 1.2.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Copyright © Prentice Hall Programming and Languages Chapter 14 Telling the Computer What to Do.
Chapter 1: An Introduction to Control Structures Introduction to Programming with C++ Fourth Edition.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 2 I Am Not a Control Freak!
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
What is Programming? A program is a list of instructions that is executed by a computer to accomplish a particular task. Creating those instructions is.
1.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007.
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
Overview.ppt Overview-An Overview of Visual Basic.NET An Overview of Visual Basic.NET.
Programming Languages
Programming and Languages Dept. of Computer and Information Science IUPUI.
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
LESSON 1 Introduction to Programming Language. Computer  Comprised of various devices that are referred to as HARDWARE.  The computer programs that.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
ICT PROGRAMMING INTRODUCTION. WHAT & WHY PROGRAMMING Programming is a process of developing computer programs Computer program is a set of instructions.
Chapter 1 An Overview of Computers and Programming Languages.
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
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.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Software Engineering Algorithms, Compilers, & Lifecycle.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
CIS 365: Visual Application Development Introduction to Computers and Programming.
Introduction to Programming in C++ Seventh Edition Chapter 1: An Introduction to Programming.
CSCI-235 Micro-Computer Applications
LESSON 1 Introduction to Programming Language
TRANSLATORS AND IDEs Key Revision Points.
An Introduction to Control Structures
Early - I can develop a sequence of instructions and run them using programmable devices or equivalent Designs a simple sequence of instructions/algorithm.
An Introduction to Control Structures
ICT Programming Lesson 1:
An Introduction to Programming with C++ Fifth Edition
Presentation transcript:

An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming

An Introduction to Programming with C++, Fifth Edition2 Objectives Explain the history of programming languages Explain the sequence, selection, and repetition structures Write simple algorithms using the sequence, selection, and repetition structures

An Introduction to Programming with C++, Fifth Edition3 Concept Lesson Programmers A Brief History of Programming Languages Control Structures Summary

An Introduction to Programming with C++, Fifth Edition4 Programmers Programs are the directions given to computers Programmers are the people who write computer programs –Applications programmers write, maintain, and/or customize programs that handle a specific task –Systems programmers write and maintain programs that help the computer carry out its basic operating functions

An Introduction to Programming with C++, Fifth Edition5 A Brief History of Programming Languages Programming languages are the languages used to communicate with a computer –E.g., C++, C#, Java, Visual Basic, Perl, C, COBOL –Types Machine languages Assembly languages High-level languages

An Introduction to Programming with C++, Fifth Edition6 Machine Languages The first programmers had to write the program instructions using only combinations of 0s and 1s –E.g., Instructions written in 0s and 1s are called machine language or machine code Each type of machine has its own language Machine languages are the only way to communicate directly with the computer Programming in machine language is tedious and error-prone; requires highly trained programmers

An Introduction to Programming with C++, Fifth Edition7 Assembly Languages Assembly languages simplify programmer’s job Can use mnemonics instead of 0s and 1s –E.g., ADD bx, ax Assembly programs require an assembler to convert instructions into machine code Easier to write programs in assembly language –But still tedious and requires highly trained programmers

An Introduction to Programming with C++, Fifth Edition8 High-Level Languages High-level languages allow programmer to use English-like instructions –E.g., grossPay = hours * rate –High-level languages are more machine-independent Programs written in a high-level language can be used on many different types of computers Compilers convert the instructions into 0s and 1s Interpreters translate the program line by line as the program is running

An Introduction to Programming with C++, Fifth Edition9 High-Level Languages (continued) When writing a procedure-oriented program, the programmer concentrates on the major tasks that the program needs to perform –Examples: COBOL, BASIC, C An object-oriented program requires programmer to focus on the objects that the program can use to accomplish its goal –Examples: C++, Visual Basic, Java, C#

An Introduction to Programming with C++, Fifth Edition10 Control Structures Programs are written using three basic structures –Sequence Used in every program you write –Repetition Used in most programs you write –Selection Used in most programs you write Called control structures or logic structures

An Introduction to Programming with C++, Fifth Edition11 The Sequence Structure The sequence structure directs the computer to process the program instructions, one after another, in the order listed in the program

The Sequence Structure (continued) An Introduction to Programming with C++, Fifth Edition12

An Introduction to Programming with C++, Fifth Edition13 The Repetition Structure Repetition structure: directs computer to repeat one or more instructions until some condition is met –Also called a loop or iteration

The Repetition Structure (continued) An Introduction to Programming with C++, Fifth Edition14

An Introduction to Programming with C++, Fifth Edition15 The Repetition Structure (continued) What could you do if you don’t know precisely how many steps separate Rob from the chair?

The Repetition Structure (continued) An Introduction to Programming with C++, Fifth Edition16

An Introduction to Programming with C++, Fifth Edition17 The Selection Structure Selection structure: makes a decision and then takes an appropriate action based on that decision –Also called the decision structure

The Selection Structure (continued) An Introduction to Programming with C++, Fifth Edition18

An Introduction to Programming with C++, Fifth Edition19 The Selection Structure (continued)

An Introduction to Programming with C++, Fifth Edition20 Summary Programs: step-by-step instructions that tell a computer how to perform a task Programmers use programming languages to communicate with the computer –First programming languages were machine languages –High-level languages can be used to create procedure- oriented programs or object-oriented programs Algorithm: step-by-step instructions that accomplish a task (not written in a programming language) –Algorithms contain one or more of the following control structures: sequence, selection, and repetition

An Introduction to Programming with C++, Fifth Edition21 Summary (continued) Sequence structure: process the instructions, one after another, in the order listed Repetition structure: repeat one or more instructions until some condition is met Selection structure: directs the computer to make a decision, and then to select an appropriate action based on that decision

An Introduction to Programming with C++, Fifth Edition22 Application Lesson: Using the Control Structures Lab 1.1: Stop and Analyze Lab 1.2: salespeople selling more than $2,000 receive 3.5% bonus; all others receive 3% bonus Lab 1.3: