SOFTWARE DEVELOPMENT METHOD

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

CS101: Introduction to Computer programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Overview of Programming and Problem Solving ROBERT REAVES.
Chapter 2: Problem Solving
Chapter 2: Problem Solving
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
PRE-PROGRAMMING PHASE
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Introduction to Computers and Programming
Chapter 1 An Overview of Computers and Programming Languages.
CSE 1340 Introduction to Computing Concepts Class 2.
Chapter 2: Problem Solving
CSEB114: PRINCIPLE OF PROGRAMMING Chapter 2: Problem Solving.
Chapter 2: Problem Solving
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
U NDERSTANDING P ROBLEMS AND HOW TO S OLVE THEM BY USING C OMPUTERS.
CSC141 Introduction to Computer Programming
หลักการโปรแกรม เพื่อแก้ปัญหาโดยใช้คอมพิวเตอร์
UniMAP Sem1-08/09EKT120: Computer Programming1 Week 1 – Lecture 1.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
Module 4 Part 1 Introduction To Software Development : Systems Analysis & Design Introduction To Software Development : Systems Analysis & Design.
กระบวนการแก้ปัญหาด้วย คอมพิวเตอร์ 3 พฤษภาคม :00-17:00.
CMSC 104: Peter Olsen, Fall 99Lecture 9:1 Algorithms III Representing Algorithms with pseudo-code.
Principles of Programming - NI July Chapter 2: Problem Solving In this chapter you will learn about: Introduction to Problem Solving Software development.
1 Program Planning and Design Important stages before actual program is written.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
 In this chapter you will learn about:  Introduction to Problem Solving  Software development method (SDM)  Specification of needs  Problem analysis.
CSEB114: Principle of programming
The Hashemite University Computer Engineering Department
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Introduction to C – Part 1.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Programming Fundamentals Introduction to Problem Solving  Programming is a problem solving activity. When you write a program, you are actually writing.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Programming Languages
Engineering Problem Solving With C An Object Based Approach
CSCI-235 Micro-Computer Applications
Computer Programming.
Week 1 – Session 1 Pn. Yasmin Yacob 04 – KUKUM Sem2-06/07
DDC 1023 – Programming Technique
ALGORITHMS AND FLOWCHARTS
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Algorithms and Flowcharts
Introduction To Flowcharting
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Unit# 9: Computer Program Development
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Understanding Problems and how to Solve them by using Computers
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
ICT Gaming Lesson 2.
Chapter 1: Preliminaries
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Presentation transcript:

SOFTWARE DEVELOPMENT METHOD CHAPTER 2 SOFTWARE DEVELOPMENT METHOD

Objectives In this chapter you will learn: The electronic computers and its’ suitable programming language To solve problem using problem-solving strategies and methods The algorithm as a guidance in designing program

Subtopics Electronic Computers Introduction to Programming Software Development Method (SDM) Algorithm Design

Electronic Computers What is computer ? A computer is an electronic device designed to perform operations specified with a set of instructions called a program. A computer include both hardware & software

Why we need computers ? The use of Computer in daily activities bill payment, booking transportation ticket, communication services, e-mailing friends, on-line communication, subject registration, course assessments & etc. As for engineering students, you should develop the ability to solve problems, and it is very likely that you will need to use computers for problem solving

Computer Hardware (1) Major hardware components : Central Processing Unit (CPU) Control unit (CU) & Arithmetic/Logic Unit (ALU) Memory (main memory) Storage Devices (disks, CDs, tapes) Input/Output Devices (monitors, keyboards, mice, printers Communication Devices (modems and network interface cards (NIC cards) Note : The components are connected through a subsystem called a bus that transfers data between the components. (Source : Y.D. Liang “Introduction to Programming with C++”, Comprehensive Version. International Edition. Pearson Education, 2007) BEC 10102 SEM 1 2010/2011

Computer Hardware (2) BEC 10102 SEM 1 2010/2011 HARDWARE = PERIPHERAL EQUIPMENT + CENTRAL/SYSTEM UNIT BEC 10102 SEM 1 2010/2011

Computer Software Operating System (OS) Unix, Window, Linux Software Tools (Utility Packages) word processors (MicrosoftWord, WordPerfect) spreadsheet programs (Excel, Lotus1-2-3, ...) Computer Languages/ Programming Languages machine language assembly language binary language high level languages (C, C++, Ada, Fortran, Basic, java) User Developed Programs SMAP On-Line MayBank2you

Intro to Programming Programming is the core of everything to do with computers, computing, networked systems, management information systems, multimedia and so on (all computer-based things) Everything that runs on a computer is a program and somebody (programmer) has to write it using specific programming language. To understand how computers can be used, how applications work, how systems are configured, it is necessary for you to understand what programs are and how they are constructed. BEC 10102 SEM 1 2010/2011

Software Development Method (SDM) What is Problem Solving@Solution ? The process of transforming the description of a problem into the solution of that problem by using our knowledge of the problem domain and by relying on our ability to select and use appropriate problem-solving strategies, techniques, and tools.

SDM Phases provides us with a precise definition of the problem. we identify problem inputs, outputs, constraints, and formulas and equations to be used. concerned with developing an algorithm (subtopic 1.4) for the solution of the problem.

SDM : Coding & Implementation Code the finalized algorithm using a suitable programming language. Go through the compiling & execution process. Normally, you will face this three types of programming errors Logic/Design errors Syntax errors Runtime errors

Logic/Design errors Design errors occur during the analysis, design, and implementation phases. We may choose an incorrect method of solution for the problem to be solved, we may make mistakes in translating an algorithm into a program, or we may design erroneous data for the program. Design errors are usually difficult to detect. Debugging them requires careful review of problem analysis, algorithm design, translation, and test data.

Syntax Errors Syntax errors are violations of syntax rules, which define how the elements of a programming language must be written. They occur during the implementation phase and are detected by the compiler during the compilation process. In fact, another name for syntax errors is compilation errors. If your program contains violations of syntax rules, the compiler issues diagnostic messages. Depending on how serious the violation is, the diagnostic message may be a warning message or an error message.

Runtime Errors Run-time errors are detected by the computer while your program is being executed. They are caused by program instructions that require the computer to do something illegal, such as attempting to store inappropriate data or divide a number by zero. When a run-time error is encountered, the computer produces an error diagnostic message and terminates the program execution. You can use diagnostic messages to debug run-time errors.

SDM : Testing and Verification Testing the completed program to verify that it works as desired. Do not rely on just one test case . Run the program several times using different sets of data to make sure that it works correctly for every situation provided in the algorithm. BEC 10102 SEM 1 2010/2011

SDM : Documentation & Maintenance For every problem solving, there are 5 things to be documented : Program description Algorithm development and changes Well-commented program listing Sample test run User’s manual Maintenance is concerned with ongoing correction of problems, revision to meet changing needs and addition of new features. The better the documentation is, the efficiently this phase can be performed.

Algorithm Design An algorithm is a sequence of a finite number of steps arranged in a specific logical order that, when executed, produces the solution for a problem. An algorithm design should be put on paper. For this purpose, and also to facilitate its development, we resort to pseudocoding and flowcharting

Analogy A) How to use ATM Machine ? i. Step 1 ? ii. Step 2 ? ………. x. Final step ? B) How to register courses using SMAP on-line ?

Pseudocoding Short English phrases with a limited vocabulary are use to describe the algorithm (the processing steps). A pseudocode must : have a limited vocabulary be easy to learn produce simple, English-like narrative notation be capable of describing all algorithms, regardless of their complexity

Example of Pseudocode Problem 1 : (Sequence structure) Compute total of resistor values. Begin read resistor1, resistor2 total = resistor1 + resistor2 print “ total “ End

Flowcharting A graphical technique for algorithm design and representation, is equivalent to pseudocoding and can be used as an alternative to it.

Flowchart Symbols (1) Symbol Name Of Symbol Description And Example Terminal Indicates the beginning or end of an algorithm Input/Output Indicates an Input or Output operation Process Indicates computation or data manipulation Decision Indicates a decision point in the algorithm

Flowchart Symbols (2) Symbol Name Of Symbol Description And Example Loop Specific for for statement Indicates the initial, final and increment values of a loop. Flow Lines/ Arrow Used to connect the symbols and indicates the logic flow On-Page Connector Provides continuation of a logical path on another point in the same page. Off-Page Connector Provides continuation of a logical path on another page

Example of Flowchart Problem 1 : (Sequence statements) Compute total of resistor values.

Pseudocode & Flowchart Convention Sequence Structure a series of steps or statements that are executed in order (ex : as shown in Problem 1) Selection Structure Define two courses of action depending on the outcome condition ( true or false) Repetition control structures Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied.

Sequence Structure begin Statement_1 Statement_2 … Statement_n end

Selection Structure if condition statement Double Selection (if-else) Single Selection (if) if condition statement Double Selection (if-else) if condition then_part else else_part end_if BEC 10102 SEM 1 2010/2011

Repetition Structure while condition loop-body end_while BEC 10102 SEM 1 2010/2011

Applying the SDM ( Phase 1 to 3) Problem : The C programming test scores can be classified into two condition, PASS and FAIL. The student is require to input their marks in positive integer . If the score is greater than or equal 50 message Pass will appear, message Fail otherwise

Applying the SDM : Phase 1 & 2 Phase 1 : Requirement Specification Selection Structure test scores, message ‘PASS’, message ‘FAIL’, greater or equal to 50, less than 50 Phase 2 : Data requirements : Input : test_score Output : ‘PASS’ or ‘FAIL’ Relevant formula : None Constrain : the test score must greater than 0 (zero) Condition : test_score >= 50 test_score < 50

Applying the SDM : Phase 3 (1) Phase 3 : Design ( Pseudocode/Flowchart) Pseudocode Begin Read the test scores Begin while while test_score < 0 Print ‘ Re-enter your score and must greater than 0’ Read the test_score End while if test_score >= 50 print ‘PASS’ else print ‘FAIL’ End BEC 10102 SEM 1 2010/2011

Applying the SDM : Phase 3 (2) Flowchart BEC 10102 SEM 1 2010/2011

Exercises Write an algorithm (Pseudo code and flow chart) for attending a lecture Write an algorithm that calculate the multiplication of two integer numbers. Write an algorithm which can determine the positive and negative integer. Write an algorithm that can print series of odd numbers between 0 and 12.

Start Wake Up Take Shower Get Dressed Eat Breakfast Has Transport Walk to Lecture hall N Y Late? Go back home Y Take Transport N End Enter Class

Begin Wake up Take shower Get dressed Eat breakfast If has transport take transport Else walk to lecture hall If late go back home enter class end

Begin int w; int l; int area; w=20; l=25; area=w Begin int w; int l; int area; w=20; l=25; area=w*l print “Your area is “ print area end

Write a program to calculate the square area. Print area Design a Program that a salesperson gets 6 percent commission on sales less than $1000, 8 percent on sales in the range $1000 through $2000, and 10 percent on sales in excess of $2000. Print the commission.

Write a program that can read age Write a program that can read age. Print “young” if the age less than 20, print “Adult” if the age between 20 to 30 and print “old” if the age above 30.