Software Development Method Reference : Problem Solving & Program Design in C ; Jeri R.Hanly, Elliot B.Koffman.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Chapter 2 - Problem Solving
INTRODUCTION TO PROGRAMMING
 Control structures  Algorithm & flowchart  If statements  While statements.
Designing Software With Flowcharts And Pseudo-code
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Flow Master  Flow Master is used to design and analyze single pipe.  It is very flexible as no unit conversion is needed.  Data can be entered with.
Software Development Method. Assignments Due – Homework 0, Warmup Reading – Chapter 2 –
Problem Solving and Program Design Programming. COMP104 Lecture 3 / Slide 2 Problem Solving Process l Define and analyze the problem. l Develop a solution.
Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
Problem Solving and Program Design. COMP104 Problem Solving / Slide 2 Our First Program // a simple program #include using namespace std; int main() {
1 Lab-1 CSIT-121 Spring 2005 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
Program Design and Development
The Program Development Cycle and Program Design Tools
Program design example Task: Develop an algorithm expressed in pseudocode for a specified problem specified problem.
Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
A High-Level Model For Software Development
Chapter 1 Program Design
1 Lab-1 CSIT-121 Fall 2004 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
PRE-PROGRAMMING PHASE
COS120 Software Development Using C++ AUBG Fall semester 2010
The Art of Programming Top-Down Design. The Art of Problem Solving The art of problem solving is the transformation of an English description of a problem.
CS 115 Chapter 1 Overview of Programming and Problem Solving.
1 L07SoftwareDevelopmentMethod.pptCMSC 104, Version 8/06 Software Development Method Topics l Software Development Life Cycle Reading l Section 1.4 – 1.5.
Chapter 1 Overview of Computers and Programming. 1-1 Outline 1.1 ELECTRONIC COMPUTERS THEN AND NOW 1.2 COMPUTERS HARDWARE 1.3 COMPUTERS SOFTWARE 1.4 THE.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.
Chapter 2: Problem Solving
U NDERSTANDING P ROBLEMS AND HOW TO S OLVE THEM BY USING C OMPUTERS.
Chapter 4 Programming Concepts Dept. of Computer Engineering Khon Kaen University.
Looping While-continue.
Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman CPCS 202 Chapter 2 – Input/Output
CISC105 General Computer Science Class 1 – 6/5/2006.
COS120 Software Development Using C++ AUBG Fall semester 2010 Ref book: Problem Solving, Abstraction and Design Using C++ Authors: Frank Friedman, Elliot.
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
CSEB114: Principle of programming
Developing an Algorithm
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 1 (Software Development Method) © CPCS
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
1 8/31/05CS150 Introduction to Computer Science 1 Hello World!
Chapter 1 : Overview of Computer and Programming By Suraya Alias
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
The Hashemite University Computer Engineering Department
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1.1 Modeling and Equation Solving.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
1 The Role of Algorithms in Computing. 2 Computational problems A computational problem specifies an input-output relationship  What does the.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Getting Ready for the NOCTI test April 30, Study checklist #1 Analyze Programming Problems and Flowchart Solutions Study Checklist.
Topic: Introduction to Computing Science and Programming + Algorithm
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
CS1001 Programming Fundamentals 3(3-0) Lecture 2
Algorithms and Flowcharts
Lecture 2 Introduction to Programming
Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.
Introduction to Problem Solving
CC213 Programming Applications
Understanding Problems and how to Solve them by using Computers
Basic Concepts of Algorithm
ICS103 Programming in C 1: Overview of Computers And Programming
Miles to Kilometers problem
Presentation transcript:

Software Development Method Reference : Problem Solving & Program Design in C ; Jeri R.Hanly, Elliot B.Koffman

Software Development Method 1. Specify the problem requirements 2. Analyze the problem 3. Design the algorithm to solve the problem 4. Implement the algorithm 5. Test and verify the completed program 6. Maintain and update the program

Problem Specifying the problems requirement forces you to state the problem clearly and unambiguously and to gain a clear understanding of what is required for its solution. Objective – To eliminate unimportant aspects and zero in on the root problem.

Analysis Analyzing the problem involves identifying the problem  inputs,that is,the data you have to work with  outputs,that is,the desired results  any additional requirements or constraints on the solution

Analysis At this stage, you should also determine the required format in which the results should be displayed Develop a list of problem variables and relationships These relationships may be expressed as formulas

Analysis If steps 1 and 2 are not done properly,you will solve the wrong problem. Read the problem statements carefully,first,to obtain a clear idea of the problem And second, to determine the inputs and outputs.You may find it helpful to underline phrases in the problem statement that identify the inputs and outputs,as in the problem statement below.

Analysis Compute and display the total cost of apples given the number of pounds of apples purchased and the cost per pound of apples. Next,summarize the information contained in the underlined phrases :

Analysis Problem Input quantity of apples purchased (in pounds) cost per pound of apples (in dollars per pound) Problem Output total cost of apples (in dollars)

Analysis Once you know the problem inputs and outputs, develop a list of formulas that specify relationships between them.The general formula Total cost=Unit cost X Number of units

Analysis computes the total cost of any item purchased.Substituting the variables for our particular problem yields the formula Total cost of apples = Cost per pound X Pounds of apples

Design Designing the algorithm to solve the problem requires you to develop a list of steps called an algorithm to solve the problem and then verify that the algorithm solves the problem as intended. algorithm = a list of steps for solving a problem

Design Algorithm for a Programming Problem 1. Get the data 2. Perform the computations 3. Display the results Algorithm can be presented either using pseudocode or flowchart.

Implementation Implementing the algorithm involves writing it as a program. You must convert each algorithm step into one or more statements in a programming language.

Testing Testing and verifying the program requires testing the completed program to verify that it works as desired. Run the program several times using different sets of data,making sure that it works correctly for every situation provided for in the algorithm.

Case Study 1

Problem You and your three friends plan to go for shopping around KL. There are 3 ways to go there. Your options are between LRT, taxi or bus. Due to heavy traffic congestion, you and your friends decided to choose transport which is fast but convenient. Write a program to calculate the chosen transport fare.

Analysis Choose LRT - Why ? It save time and cost Problem Input - Number of passenger and LRT fare Problem Output - LRT fare according to number of passenger and destination Relevant Formula = LRT fare X number of passenger Relevant data – LRT fare to : Bukit Bintang= RM 1.60 Bandaraya= RM 1.40 PWTC= RM 2.20

Design 1. Get number of passenger and destination. 2. Calculate the LRT fare by performing below computation : LRT fare X number of passenger 3. Display LRT fare in Ringgit Malaysia(RM)

Implementation Program…..

Testing Test the program by inserting different number of passenger and locations.

Case Study 2

Problem Your summer surveying job requires you to study some maps that gives distances in kilometers and some that use miles. You and your coworkers prefer to deal in metric measurements. Write a program that performs the necessary conversion.

Analysis The problem states that you prefer to deal in metric measurements, so you must convert distance measurements in miles to kilometers Problem Input miles# the distance in miles Problem Output kms# the distance in kilometers Relevant Formula 1 mile = kilometers

Design 1. Get the distance in miles. 2. Convert the distance to kilometers. The distance in kilometers is times the distance in miles. 3. Display the distance in kilometers

Implementation # Converts distance in miles to kilometers # Conversion constant KMS_PER_MILE = # Input distance in miles miles = 0 # Output distance in kilometers kms = 0 # Get the distance in miles print "Enter the distance in miles", miles = input(":") # Convert the distance to kilometers kms = KMS_PER_MILE * miles # Display the distance in kilometers print "That equals ", kms

Testing Distance of 10.0 miles is converted to kilometers, as it should be. Test the program by inserting other different value of distance.