Presentation is loading. Please wait.

Presentation is loading. Please wait.

EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.

Similar presentations


Presentation on theme: "EG280 Computer Science for Engineers Fundamental Concepts Chapter 1."— Presentation transcript:

1 EG280 Computer Science for Engineers Fundamental Concepts Chapter 1

2 Spring 2001EG280 CS for Engineers2 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.

3 Spring 2001EG280 CS for Engineers3 Computer Hardware CPU Internal Memory External Memory InputOutput Processor ALU CPU - Central processing unit ALU - Arithmetic and logic unit ROM - Read only memory RAM - Random access memory

4 Spring 2001EG280 CS for Engineers4 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, MathCAD,...) Computer Languages –machine (binary) language –assembly language –high level languages (C, C++, Ada, Fortran, Basic, java)

5 Spring 2001EG280 CS for Engineers5 Executing a Computer Program C language source code Machine language (object code) Compile Linker Error Messages Other useful information Other object modules Executable Code (.exe) Other useful information

6 Spring 2001EG280 CS for Engineers6 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

7 Spring 2001EG280 CS for Engineers7 The C Programming Language General purpose, machine-independent language Developed at Bell Labs in 1972 by Dennis Ritchie American National Standards Institute(ANSI) approved ANSI C standard in 1989 Today, much C-language programming is done with C++, an object-oriented programming language

8 Spring 2001EG280 CS for Engineers8 Table 1.2 Software Life-Cycle Phases PhasePercent of Effort Definition3 Specification15 Coding and modular testing14 Integrated testing8 Maintenance60

9 Spring 2001EG280 CS for Engineers9 An Engineering Problem-Solving Methodology 1. PROBLEM STATEMENT 2. INPUT/OUTPUT DESCRIPTION 3. HAND EXAMPLE 4. ALGORITHM DEVELOPMENT 5. TESTING

10 Spring 2001EG280 CS for Engineers10 First Program – Sum of Two Numbers /******************************************************************/ /* Program chapter1 */ /* */ /* This program computes the sum two numbers */ #include int main(void) { /* Declare and initialize variables. */ double number1 = 473.91, number2 = 45.7, sum; /* Calculate sum. */ sum = number1 + number2; /* Print the sum. */ printf(“The sum is %5.2f \n”, sum); /* Exit program. */ return 0; } /***************************************************************************/


Download ppt "EG280 Computer Science for Engineers Fundamental Concepts Chapter 1."

Similar presentations


Ads by Google