872135605978b6e4b35ed20007851842.ppt
- Количество слайдов: 29
Software Design
Objectives What are the differences between generic and custom software? Which best satisfies my specifications? Which is cheaper? What is the deciding factor between purchasing generic or custom software? What is the PDLC used for? Can you match a specific software development task to its step in the PDLC? Can you write an accurate job specification?
Objectives What are the differences between top-down design and bottom-up design methods? What does a flow chart track? What are the differences between spaghetti -code, modular, object oriented programming styles. Can you correctly tell if something is part of a class or if it is stored in an object?
Objectives (Cont) What are the differences between high level, mid level, low level, and 4 th generation programming languages? What are the differences between assemblers, interpreters, and compilers? What are the differences between source code and machine language? Can you diagram the compiling process from source code to executable file?
Objectives (Cont) What 2 things do all functions do? What is Multitasking? What are the differences between the save and save-as commands? What are the differences between language syntax and programming conventions? What are the differences between syntax errors, logic errors, linking errors, and runtime errors?
Generic vs Custom Software Generic Custom Where to get it? Store Hire programmer Cost? Cheap Expensive Updates? Available Expensive Customer Cheap and Expensive & Not Support? Available always Available Meet Sometimes Always & Exactly Specifications? or Mostly Deciding factor for which to buy = NEED !
PDLC - Program Development Life Cycle Is a software development tool Writing an accurate job Specification is the most important step
Top-down vs Bottom-up Begin by breaking down the project into small tasks. each output screen. Write a sub-program • Write a sub-program for each of the tasks. • Begin by designing for each of the screen. Combine each sub- • Combine each subprogram into a single program.
Flow Charts int age = 16; int n = 0; while(n<age) { cout<< age; n++; } else cout<< n; Track the flow of data through a program.
Programming Styles Spaghetti code GOTO Debug: go through every line of code. Lots of duplicated code Modular main( ) function call other sub-routines. Debug: go to the problem function( ). Pass arguments from function to function. Minimal duplication of code
Programming Styles con’t Object Oriented Programming (OOP) Classes Define what their objects Are (private data member attributes) Do (Behavior -member. Functions( )) Objects encapsulate all of their date values Call member functions to access their data. Debug: go to the problem method( ). Minimal duplication of code
In a Class vs in an Object class Box { private int my. Length; private int my. Width; private int my. Height; public Box(); }; Box pencil. Box(8, 2, 1);
In a Class vs in an Object con’t Class my. Length my. Radius my. Name my. Student. Number Output volume( ) display. Name( ) Object 15 8 Sierra 987654 8 * 2 * 1 = 16 My name is Sierra
Levels of Programming Languages High Level Languages Access Operating System and Software Mid Level Languages Access Software & Hardware Low Level Languages Access CPU Hardware Forth Generation Languages - 4 GLs Write the source code as objects are dropped onto the workspace
Text to Machine Language Assembler Stays in RAM Converts text to ML & changes CPU one line at a time Interpreter Stays in RAM Converts text to ML & runs one line at a time Compiler Compiles text to ML all at once Removed from RAM
Source Code / Machine Language Source code Is a small text file Written in a programming language Machine Language Is a small file of binary code It is only ones and zeros
The process of Compiling and Executing Source Code prog. java COMPILER Java Byte Code prog. class Bytecode Compiler Java Interpretor Machine Code prog. exe
Methods( ) Methods always do 2 things: Perform only one task Get information Calculate Display Return a value int void return 0; returns a NULL
Multitasking vs Multiprocessing Multitasking is the ability to do two things at the same time. Dual Channel CPUs Multiprocessing has more than one CPU on a motherboard. Single Channel or Hyperthreaded CPUs
Save vs Save-as Save Creates a new file with the first save. Overwrites the original file with each additional save. Save-as Creates a new file with the first save. Creates a new file with each additional save.
Syntax vs Convention Syntax The rules of the programming language The grammar of the programming language Convention A collection of professionals establish norms Accepted programming style Indentation Capitalization
3 types of ERRORS 1. Syntax Errors Stop compilation 2. Logic Errors Runs; but output is faulty 3. Runtime Errors Runs; but crashes
3 types of ERRORS (1 and 2 of 3) 1. Syntax Errors Stops compilation Easiest to fix; compiler tells us what & where the error is 2. Logic Errors Runs; but output is faulty Mathematical 2 + 3 * 4 = 20 Hardest error to fix
3 types of ERRORS (3 of 3) 4. Runtime Errors Compiles Runs but crashes during execution
Summary What are the differences between generic and custom software? Which best satisfies my specifications? Which is cheaper? What is the deciding factor between purchasing generic or custom software? What is the PDLC used for? Can you match a specific software development task to its step in the PDLC? Can you write an accurate job specification?
Summary con’t What are the differences between top-down design and bottom-up design methods? What does a flow chart track? What are the differences between spaghetti -code, modular, object oriented programming styles. Can you correctly tell if something is part of a class or if it is stored in an object?
Summary con’t What are the differences between high level, mid level, low level, and 4 th generation programming languages? What are the differences between assemblers, interpreters, and compilers? What are the differences between source code and machine language? Can you diagram the compiling process from source code to executable file?
Summary con’t What 2 things do all functions do? What is Multitasking? What are the differences between the save and save-as commands? What are the differences between language syntax and programming conventions? What are the differences between syntax errors, logic errors, linking errors, and runtime errors?
Software Design the end.
872135605978b6e4b35ed20007851842.ppt