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

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
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
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.
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.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1: An Overview of Computers and Programming Languages
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
1 Turgay Korkmaz Office: NPB Phone: (210) Fax: (210) web:
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.
Chapter 1 An Overview of Computers and Programming Languages.
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.
By Kundang K Juman Hardware & Software. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing.
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
Engineering Problem Solving with C++ An Object Based Approach
Engineering Problem Solving with C++ An Object Based Approach
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:

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

Objectives Understand basic components of a computers. Understand a problem-solving methodology for solving engineering problems with a computer.

Computer 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.

Computer hardware Internal Memory Input Output Control ALU External Memory CPU ALU: Arithmetic Logic Unit CPU: Central Processing Unit

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?

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

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

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; You may see it in the output generated

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

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

Sample Pseudo Code 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

/************************************************************/ /* 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; } /************************************************************/