ch. 1 engineering problem solving. contents i.engineering in the twenty-first century ii.computing...

28
Ch. 1 Engineering Problem Solving

Post on 19-Dec-2015

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Ch. 1 Engineering Problem Solving

Page 2: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Contents

I. Engineering in the Twenty-First CenturyII. Computing Systems: Hardware and SoftwareIII.An Engineering Problem-Solving MethodologyIV. Homework

Page 3: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

I. Engineering in the Twenty-I. Engineering in the Twenty-First CenturyFirst Century

Page 4: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

RECENT ENGINEERING ACHIEVEMENTS• In 1989, the National Academy of Engineering selected the 10 en

gineering achievements that it considered to be the most important accomplishments during the previous 25 years:

Microprocessor Moon landing Application satellites CAD(Computer Aided Design)/CAM(Computer Aided Manufacturing)

Jumbo jet Advanced composite materials CAT(Computer Axial Tomography) Genetic engineering Laser Optical fiber

Page 5: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

GRAND CHALLENGES FOR THE FUTURE

• The Office of Science and Technology Policy in Washington, D.C. identified the grand challenges as part of a research and development strategy for high performance computing.

Prediction of weather, climate, and global change Computerized speech understanding Human Genome Project Improvements in vehicle performance Enhanced oil and gas recovery

Page 6: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

CHANGING ENGINEERING ENVIRONMENT

strong communication skills for both oral presentations and for preparing written materials

the design/process/manufacture path, which consists of taking an idea from a concept to a product

cooperativeness in interdisciplinary team to understand world marketplace not only to analyze data, but synthesize a solution u

sing many pieces of information to consider their solutions in their social context

Engineers need:

Page 7: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

II. Computing Systems: II. Computing Systems: Hardware and SoftwareHardware and Software

Page 8: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Computing Systems

• Computer: A machine that is designed to perform operations that are specified with a set of instructions called a program.

• Hardware: the computer equipment, such as the keyboard, the mouse, the terminal, the hard disk, and the printer.

• Software: the programs that describe the steps

that we want the program to perform.

Page 9: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Computer Hardware• CPU

– Central Processing Unit– Processor + ALU(Arithmetic logic unit)

• Internal Memory– Read-only Memory(ROM)– Random-access Memory(RAM)

• External Memory– Hard-disk– Floppy-disk

Page 10: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Internal organization of a computer

Page 11: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Types of computer• Personal Computer(PCs)

– small inexpensive computers– commonly used in offices, homes, and laboratories– microcomputer

• Workstation– minicomputer or mainframe computer– small enough to fit on a desktop

• Super computer– the fastest computer

Page 12: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

COMPUTER SOFTWARE

Page 13: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Operating System

– provides an interface between the user and the hardware

– in which the user can select and execute the application software

– contains many utilities to perform functions such as printing files, copying files and listing files.ex) dir (on DOS), ls (on UNIX) …

Page 14: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Software tools

• word processor (Microsoft word, 한글 ) • spread sheet (Lotus 1-2-3, Excel…) • database management system (dBase IV, Paradox,…)

• CAD package (AutoCAD, AutoSketch, CADKEY,…)

• mathematical computation tools and graphic tools (MATLAB, Mathmatica, MATHCAD, Maple)

Page 15: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Computer Languages

• machine language • assembly language • high-level language

– Fortran – COBOL – Basic – Pascal – Ada – C++ – Java – C

• 4GL • natural language

Page 16: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Executing a Computer Program

1. Compiling – source program – object program

2. Linking and Loading 3. Executing 4. Debugging

Page 17: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

• Compiling: – Translate high-level language into machine language– source program: the original program written by high-le

vel language such as C– object program: the machine language version of sour

ce program

• Linking and loading– Linking: link the other necessary machine language st

atements to the object program– Loading: load the program into memory

Page 18: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

• Debugging– a process to correct errors(often called bugs) in a

program– compile-time error: syntactic errors– run-time error: logic errors

Page 19: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

Software Life-Cycle Phases

Life Cycle Percent of EffortDefinition 3Specification 15Coding and modular testing 14Integrated testing 8Maintenance 60

Page 20: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

III. An Engineering III. An Engineering Problem-Solving MethodologyProblem-Solving Methodology

Page 21: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

An Engineering Problem-Solving Methodology

• The process or methodology for problem solving that we will use throughout this course has five steps:

1.State the problem clearly 2.Describe the input and output information 3.Work the problem by hand (or with a calculator) for a simple set of data

4.Develop a solution and convert it to a computer program

5.Test the solution with a variety of data

Page 22: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

1. PROBLEM STATEMENT

• Compute the straight-line distance between two points in a plane.

Page 23: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

2. INPUT/OUTPUT DESCRIPTION

I/O Diagram

Point 1

Point 2

Distancebetween points

Page 24: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

3. HAND EXAMPLE• Let the points p1 and p2, have the following coordin

ates: p1 = (1,5); p2 = (4,7);

• distance = SQRT((side1)2 + (side1)2) = 3.61

Page 25: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

• Decomposition Outline

1. Give values to the two points. 2. Compute the lengths of the two sides of the right t

riangle generated by the two points. 3. Compute the distance between the two points, which

is equal to the length of the hypotenuse of the triangle.

4. Print the distance between the two points

4. ALGORITHM DEVELOPMENT

Page 26: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

/*---------------------------------------------------*//* Program chapter1_1 *//* *//* This program computes the *//* distance between two points. */#include<stdio.h> #include<math.h>int main(void) { /* Declare and initialize variables. */

double x1=1, y1=5, x2=4, y2=7, side_1, side_2, distance; /* Compute sides of a right triangle. */side_1 = x2 - x1; side_2 = y2 - y1; distance = sqrt(side_1*side_1 + side_2*side_2); /* Print distance. */ printf("The distance between the two points is " "%5.2f \n",distance);

/* Exit program. */ return (0);

} /*---------------------------------------------------*/

• Coding

Page 27: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

5. TESTING

• The distance between the points is 3.61!!

Page 28: Ch. 1 Engineering Problem Solving. Contents I.Engineering in the Twenty-First Century II.Computing Systems: Hardware and Software III.An Engineering Problem-Solving

VI. HomeworkVI. Homework

• Write a short report (2000 자 ) on one of these grand challenges by March 21:

Prediction of weather, climate, and global change

Computerized speech understanding Mapping of Human Genome Project Improvements in vehicle performance Enhanced oil and gas recovery