Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Software Construction Process. Computer System Components Central Processing Unit (Microprocessor) 01001101 10110101 11011001 10110100 00101011 01011001.

Similar presentations


Presentation on theme: "The Software Construction Process. Computer System Components Central Processing Unit (Microprocessor) 01001101 10110101 11011001 10110100 00101011 01011001."— Presentation transcript:

1 The Software Construction Process

2 Computer System Components Central Processing Unit (Microprocessor) 01001101 10110101 11011001 10110100 00101011 01011001 10101010 01011011 10100110 01001011 Secondary Storage (Hard Drive, DVD-ROM Drive) Primary Storage (RAM) Input Devices (Mouse, Keyboard) Output Devices (Monitor, Printer) Communications Bus Network Interface Devices (Modem, Network Card) Internet

3 A Software Requirement Develop a program that finds and prints all integers between 1 and 10,000 that are evenly divisible by 7, and whose last digit on the right is a 4 or 6.

4 The Requirement and the Design Develop a program that finds and prints all numbers between 1 and 10,000 that are evenly divisible by 7, and whose last digit on the right is a 4 or 6. Set number to 1 Number less than or equal to 10,000 Number divisible by 7 4 or 6 in ones column Print number Increment number by 1 S F Yes No

5 Boards, Tubes, and Patch Cables 01001101 10110101 11011001 10110100 00101011 01011001 10101010 01011011 10100110 01001011 Application Program

6 Setting Switches 01001101 10110101 11011001 10110100 00101011 01011001 10101010 01011011 10100110 01001011 Application Program

7 I/O Devices and Operating System 01001101 10110101 11011001 10110100 00101011 01011001 10101010 01011011 10100110 01001011 01010101 10101010 10101110 01001011 Application Program Operating System

8 Assembly Language, Monitor, and Keyboard 01001101 10110101 11011001 10110100 00101011 01011001 01010101 10101010 10101110 01001011 Application Program Operating System LOOP: LOAD A, R1 LOAD 7, R2 TEST R1, R2 BRZ LOOP 10111010 10101010 01011011 Assembler

9 Compiler (Syntax and Semantics) 11011001 10110100 00101011 01011001 01010101 10101010 Application Program Operating System 10111010 10101110 01001011 Assembler 10101011 00101010 01101011 Compiler #include int main (void) { int answer; float value; scanf(“%d”, &value); answer = value / 3; printf(“%d\n”,answer); return 0; }

10 Algorithm in C Source Code #include int main(void) { int number = 1; while (number <= 10000) { if ( (number % 7) == 0 ) { if ( ((number % 10) == 4) || ((number % 10) == 6) ) { printf("%d\n", number); } // End if } // End if number++; // Increment number by one } // End while return 0; } // End main

11 From Requirements to Running Program Software Design program.c or program.c (Source Code) program.o (Object Code) program.exe (Executable Code) Software Requirements Text Editor Compiler (and Preprocessor) Linker Operating System Design Method Design Fundamentals Coding Standards Header Files Function Libraries Input/Output Facilities

12 Software Construction Process EDIT and SAVE COMPILE LINK RUN TEST and SQA BASELINE DESIGN Requirements A B C D 23 1 4 5 6 7 8 E Note: See next slide for meanings of A - E

13 Categories of Errors A: Compiler errors – doesn’t follow preprocessor or C syntax B: Linker errors – functions declared but not defined; no main function; function library not found C: Run-time errors – segmentation fault; out-of- range errors; wrong data types D: Logic errors – wrong use of control statements; errors in function arguments; algorithm coded incorrectly E: Design errors – doesn’t follow design or satisfy requirements; design has flaws


Download ppt "The Software Construction Process. Computer System Components Central Processing Unit (Microprocessor) 01001101 10110101 11011001 10110100 00101011 01011001."

Similar presentations


Ads by Google