Unformatted text preview:

Chapter 13TopicsHow People Make ProgramsFrom Idea to AlgorithmFrom Idea to Algorithm: Stepwise RefinementFrom Idea to Algorithm: Step RefinementSlide 7Slide 8From Idea to Algorithm: Control StructuresFrom Idea to Algorithm: TestingFrom Algorithm to ProgramInto the ComputerTranslation SoftwareCompilerProgramming Languages & MethodologiesSlide 16High Level LanguagesStructured ProgrammingUnstructured ProgrammingSlide 20Object-Oriented ProgrammingObject Oriented ProgrammingVisual ProgrammingLanguages for UsersProgramming for the WebThe Future of ProgrammingSystem Analysis and the System Life CycleThe Systems Development Life CycleSlide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35The Science of ComputingThe State of Software: Software ProblemsThe State of Software: Software SolutionsSlide 39 2002 Prentice HallChapter 13Systems Design & Development 2002 Prentice Hall 2 TopicsHow People Make ProgramsFrom Idea to AlgorithmFrom Algorithm to ProgramProgramming Languages and MethodologiesSystem Analysis and the System Life CycleThe State of Software 2002 Prentice Hall 3 How People Make ProgramsProgramming is a specialized form of problem solving and involves:Understanding the Problem–Defining the problem Designing a Solution–Devising, refining, and testing the algorithmImplementing the Design–Writing the program Evaluating the Solution–Testing and debugging the program 2002 Prentice Hall 4 From Idea to AlgorithmA school teacher needs a program to play a number-guessing game so students can learn to develop logical strategies and practice their arithmetic. In this game the computer picks a number between 1 and 100 and gives the player seven turns to guess the number. After each incorrect try the computer tells the player whether the guess is too high or too low.Start with a statement of the problem: 2002 Prentice Hall 5 From Idea to Algorithm: Stepwise RefinementThe first cut at the problem breaks it into three parts: a beginning, a middle, and an end. Each of these parts represents a smaller programming problem to solve.BeginGameRepeat Turnuntil Number isGuessedEndGame 2002 Prentice Hall 6 From Idea to Algorithm: Step RefinementThe next refinement fills in a few details for each part.1. Begin Game Display instructionsPick a number between 1 and 1002. Repeat Turn Until Number is Guessed Input guess from user Respond to guess End Repeat3. End Game Display end message 2002 Prentice Hall 7 From Idea to Algorithm: Stepwise Refinement Fill in the crucial details.How to respond to guessIf guess = number, then say so and quit;if guess < number, then say guess is too small;if guess> number, then say guess is too high. 2002 Prentice Hall 8 From Idea to Algorithm: Step Refinement Give the computer a way of knowing when seven turns have passed. begin game display instructions pick a number between 1 and 100 set counter to 0 repeat turn until number is guessed or counter = 7 input guess from user if guess = number, then say so and quit; else if guess < number, then say guess is too small; else say guess is too big add 1 to counter end repeatend game display end message 2002 Prentice Hall 9 From Idea to Algorithm: Control StructuresLogical structures that control the order in which instructions are carried out Three basic control structures:Sequence--group of instructions followed in order from first to lastSelection--to choose between alternative courses of action depending on certain conditions. Repetition--allows a group of steps to be repeated several times, usually until some condition is satisfied 2002 Prentice Hall 10 From Idea to Algorithm: TestingThis round of testing is designed to check the logic of the algorithm Test the algorithm by following the instructions using different sets of numbers. 2002 Prentice Hall 11 From Algorithm to ProgramA simple program contains:The program headingThe declarations and definitionThe body 2002 Prentice Hall 12 Into the ComputerA text editor is used to enter and save the program.Use either a translator or compiler to translate the program into machine language. 2002 Prentice Hall 13 Translation SoftwareTranslation software, called an interpreter, translates a high-level program to a machine language one statement at a time during execution. 2002 Prentice Hall 14 CompilerA compiler translates an entire high-level program to machine language before executing the program. 2002 Prentice Hall 15 Programming Languages & MethodologiesMachine language is the native language of a computer.  Instructions for the four basic arithmetic operations, for comparing pairs of numbers, for repeating instructions, and so on all binary Instructions, memory locations, numbers, and characters are all represented by strings of zeros and ones 2002 Prentice Hall 16 Programming Languages & MethodologiesAn assembler translates each statement of assembly language into the corresponding machine-language statement. 2002 Prentice Hall 17 High Level LanguagesHigh level languages fall somewhere between natural human languages and precise machine languages Examples: C++, Java, Basic, FORTRAN, COBOL They are easier to write, debug and are transportable between machines. 2002 Prentice Hall 18 Structured ProgrammingStructured programming is a technique to make the programming process easier and more productive.A program is well structured if:- It’s made up of logically cohesive modules- The modules are arranged in a hierarchy- It’s straightforward and readable. 2002 Prentice Hall 19 Unstructured ProgrammingAn unstructured program is like a huge, complicated machine that can’t be easily broken down into sections. Any modification would require the entire machine to be disassembled. 2002 Prentice Hall 20 Structured Programmingproblems can be isolated to individual modules the input and output of each module in the assembly line are easier to understand Structured programs are easier to understand and modify because: 2002 Prentice Hall


View Full Document

USA CIS 110 - Systems Design & Development

Download Systems Design & Development
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Systems Design & Development and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Systems Design & Development 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?