Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Software Construction Process

Similar presentations


Presentation on theme: "The Software Construction Process"— Presentation transcript:

1 The Software Construction Process

2 Computer System Components
Internet Primary Storage (RAM) Network Interface Devices (Modem, Network Card) Output Devices (Monitor, Printer) Input Devices (Mouse, Keyboard) Communications Bus Secondary Storage (Hard Drive, CD-ROM Drive) Central Processing Unit (Microprocessor)

3 A Software Requirement
Develop a program that finds and prints all numbers between 1 and 10,000 that are divisible by both 7 and 3. For each number found, display the number and the product of the two quotients.

4 The Requirement and the Design
Set number to 1 Develop a program that finds and prints all numbers between 1 and 10,000 that are divisible by both 7 and 3. For each number found, display the number and the product of the two quotients. No Number less than or equal to 10,000 Yes No Number divisible by 7 Yes No Number divisible by 3 Yes Print number information Increment number by 1 F

5 Boards, Tubes, and Patch Cables
Application Program

6 Setting Switches Application Program 01001101 10110101 11011001

7 I/O Devices and Operating System
Operating System Application Program

8 Assembly Language, Monitor, and Keyboard
Operating System Assembler LOOP: LOAD A, R1 LOAD 7, R2 TEST R1, R2 BRZ LOOP Application Program

9 Compiler (Syntax and Semantics)
Operating System #include <stdio.h> int main (void) { int anAnswer; float aValue; anAnswer = aValue / 3; printf(“%d\n”,anAnswer); return 0; } Assembler Compiler Application Program

10 Algorithm in C Source Code
aNumber = LOWNUMBER; while (aNumber <= HIGHNUMBER) { firstQuotient = aNumber / FIRSTDIVISOR; if ( (aNumber % FIRSTDIVISOR) == 0 ) { secondQuotient = aNumber / SECONDDIVISOR; if ( (aNumber % SECONDDIVISOR) == 0) { theProduct = firstQuotient * secondQuotient; printf("%d %7.2f %7.2f %8.2f\n",aNumber, firstQuotient, secondQuotient, theProduct); } // End if } // End if aNumber++; // Increment aNumber by one Note: This is only a portion of the complete C program

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

12 Software Construction Process
Requirements 1 DESIGN COMPILE 2 3 8 EDIT and SAVE 4 A BASELINE LINK E B D C 7 5 TEST and SQA RUN 6 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"

Similar presentations


Ads by Google