{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture4

# lecture4 - CMPT 128 Introduction to Computing Science for...

This preview shows pages 1–9. Sign up to view the full content.

1 © Janice Regan, CMPT 128 Sept 2007 CMPT 128: Introduction to Computing Science for Engineering Students The software development method Algorithms

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© Janice Regan, CMPT 128 Sept 2007 2 Programming Methodologies Structured design 1. A problem is divided into smaller sub- problems 2. Each sub-problem is solved 3. The solutions of all sub-problems are then combined to solve the problem
© Janice Regan, CMPT 128 Sept 2007 3 Programming Methodologies In Object oriented design (OOD), a program is a collection of interacting objects An object consists of data and operations Steps in OOD: 1. Identify objects 2. Form the basis of the solution 3. Determine how these objects interact

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© Janice Regan, CMPT 128 Sept 2007 4 Getting to step 1: writing the program Writing and debugging the C++ program implementing an application is only a small part of designing and building an application. The software development method puts writing the program into a larger context. provides a valuable guidelines to help you develop usable and efficient applications Saves time and effort during development of computer applications .
© Janice Regan, CMPT 128 Sept 2007 5 Software Development Method 1. Specify the problem requirements 2. Analyze the problem 3. Design an algorithm to solve the problem and tests to demonstrate the algorithm is working correctly 4. Implement the algorithm in a programming language 5. Test and verify that the implemented algorithm (program) is working correctly 6. Maintain and update the program

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© Janice Regan, CMPT 128 Sept 2007 6 Algorithms and Programs An algorithm is a finite set of instructions that is a step- by-step solution for a problem A computer can be instructed to implement many (not all) algorithms with a finite number of instructions A program is a set of computer instructions that implements an algorithm There are different ways to implement the same algorithm There may be many different algorithms to solve a given problem
© Janice Regan, CMPT 128 Sept 2007 7 Software Development: 1 Specify the problem requirements: State the problem clearly What does your application need to do? Under what conditions does it need to do it? Do you need more information to specify the problem? Analyze the problem : Define inputs and outputs Specify what the important quantities are Outline and relationships between important quantities

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sept 2007 8 Software Development: 2 Design an algorithm to solve the problem: Determine a set of steps that will take the inputs and produce the outputs. (an algorithm) Use top down design: Start by identifying the large tasks that need to be done Then, consider each task, and make a more detailed set of steps to accomplish it, this is called refining your algorithm . As you refine your algorithm be sure to consider special
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 55

lecture4 - CMPT 128 Introduction to Computing Science for...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online