1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Chapter 1: An Overview of Computers and Programming Languages
CPSC- 120 Principle of Computer Science I Computer = Hardware + Software.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
1 Turgay Korkmaz Office: NPB Phone: (210) Fax: (210) web:
12/4/20151 Introduction To Computer Science Bina Ramamurthy.
Computing Systems & Programming ECE Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
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.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Introduction to Computer Programming using Fortran 77.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Software Engineering Algorithms, Compilers, & Lifecycle.
CHAPTER 1 OVERVIEW OF COMPUTER AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3 Computer Software 1.4 The Software Development.
BIL 104E Introduction to Scientific and Engineering Computing Lecture 1.
Chapter 1: Introduction to Computers and Programming
BASIC PROGRAMMING C SCP1103 (02)
Introduction to Computers and C++ Programming
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
Chapter 1: Introduction to computers and C++ Programming
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Chapter 1: Introduction to Computers and Programming
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Hardware & Software Programming. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing unit.
Computer Electronic device Accepts data - input
Understand the interaction between computer hardware and software
ICS103 Programming in C 1: Overview of Computers And Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving

2 Objectives Understanding of basic terminology for computers. Understanding of a problem-solving methodology used when solving engineering problems with a computer

3 Computing Systems: Hardware and Software A computer is a machine designed to perform operations specified with a set of instructions called a program. Hardware refers to the computer equipment. –keyboard, mouse, terminal, hard disk, printer Software refers to the programs that describe the steps we want the computer to perform.

4 Computer Hardware CPU - Central processing unit ALU - Arithmetic and logic unit ROM - Read only memory RAM - Random access memory CPU Internal Memory Input Output Processor ALU External Memory

5 Main Memory Main Memory - Terminology: –Main memory is divided into numbered locations called bytes. –A byte is a sequence of 8 bits. – A bit is a binary digit (0 or 1). –The location number associated with a byte is called the address. –A group of consecutive bytes is used for storing the binary representation of a data item, such as a number or a character. What value is represented by the 4th byte?

6 Computer Software Operating System - Provides an interface with the user –unix, windows, linux,... Software Tools –word processors (MicrosoftWord, WordPerfect,...) –spreadsheet programs (Excel, Lotus1-2-3,...) – mathematical computation tools (MATLAB, Mathematica,...) Computer Languages –machine language –assembly language –binary language –high level languages (C, C++, Ada, Fortran, Basic, java)

7 Executing a Computer Program Compiler –Converts source program to object program Linker –Converts object program to executable program CompileLink/loadExecute C++ language program Machine language program Program output Input data

8 Key Terms Source Program –printable/Readable Program file Object Program –nonprintable machine readable file Executable Program –nonprintable executable code Syntax errors –reported by the compiler Linker errors –reported by the linker Execution/Run-time errors –reported by the operating system Logic errors –not reported

9 Basic C++ Program Structure /*********************************************************************** * Header Comments ***********************************************************************/ include files global declarations int main() { declarations and executable statements return 0; }//end block of main

10 An Engineering Problem-Solving Methodology 1. PROBLEM STATEMENT 2. INPUT/OUTPUT DESCRIPTION 3. HAND EXAMPLE 4. ALGORITHM DEVELOPMENT 5. TESTING

11 Example 1. Write a program to compute the volume of box. 2. Input: length, width, height Output: volume 3. Hand Example: volume = 20.75*11.5* Algorithm: input length, width and height compute volume output volume 5. Implement algorithm in C++ and test

12 First Program – volume of a box /************************************************************/ /* Program chapter1 */ /* */ /* This program computes the volume of a box */ /************************************************************/ #include using namespace std; int main() { // Declare and initialize objects double length( 20.75), width(11.5),height(9.5), volume; // Calculate volume. volume = length * width * height; // Print the volume. cout << “The volume is “ << volume << endl; // Exit program. return 0; } /************************************************************/