Module 4 Part 1 Introduction To Software Development : Systems Analysis & Design Introduction To Software Development : Systems Analysis & Design.

Slides:



Advertisements
Similar presentations
CS101: Introduction to Computer programming
Advertisements

Chapter 2: Problem Solving
Chapter 2: Problem Solving
Reference :Understanding Computers
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
Fundamentals of Algorithms MCS - 2 Lecture # 4
SWE Introduction to Software Engineering
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 1 Slide 1 An Introduction to Software Engineering.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Chapter 3 Planning Your Solution
The Program Design Phases
PRE-PROGRAMMING PHASE
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 1 Slide 1 System and Software Engineering.
1 L07SoftwareDevelopmentMethod.pptCMSC 104, Version 8/06 Software Development Method Topics l Software Development Life Cycle Reading l Section 1.4 – 1.5.
Chapter 2: Problem Solving
CSEB114: PRINCIPLE OF PROGRAMMING Chapter 2: Problem Solving.
Structured COBOL Programming, Stern & Stern, 9th edition
Chapter 2: Problem Solving
CSI315 Web Applications and Technology Overview of Systems Development (342)
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
U NDERSTANDING P ROBLEMS AND HOW TO S OLVE THEM BY USING C OMPUTERS.
Simple Program Design Third Edition A Step-by-Step Approach
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 1 INTRODUCTION TO SOFTWARE DEVELOPMENT: SYSTEM ANALYSIS & DESIGN.
2-Oct-15 1 Introduction to Software Engineering Softwares Importance of SWE Basic SWE Concepts ICS Software Engineering.
2-Oct-15 Introduction to SWE1 Introduction to Software Engineering Softwares Importance of SWE Basic SWE Concepts.
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.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 1 Slide 1 An Introduction to Software Engineering.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Slide 1 Software Development 1. Requirement Specification 2. Analysis 3. Algorithm Design 4. Implementation 5. Testing 6. Documentation.
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.
CMSC 1041 Algorithms II Software Development Life-Cycle.
Lecture 1 The University of Lahore Software Engineering Saeed Akhtar
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Introduction to Software Engineering. Why SE? Software crisis manifested itself in several ways [1]: ◦ Project running over-time. ◦ Project running over-budget.
กระบวนการแก้ปัญหาด้วย คอมพิวเตอร์ 3 พฤษภาคม :00-17:00.
PROGRAMMING PAPER 2 AS Algorithms.
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.
An Introduction to Software Engineering (Chapter 1 from the textbook)
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
 In this chapter you will learn about:  Introduction to Problem Solving  Software development method (SDM)  Specification of needs  Problem analysis.
CSEB114: Principle of programming
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
Programming Fundamentals Introduction to Problem Solving  Programming is a problem solving activity. When you write a program, you are actually writing.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
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 COMPUTER PROGRAMMING(IT-303) Basics.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
 Problem Analysis  Coding  Debugging  Testing.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
ICS 3UI - Introduction to Computer Science
Algorithms II Software Development Life-Cycle.
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Algorithms and Flowcharts
An Introduction to Visual Basic .NET and Program Design
Unit# 9: Computer Program Development
Chapter 1 Introduction(1.1)
Understanding Problems and how to Solve them by using Computers
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Presentation transcript:

Module 4 Part 1 Introduction To Software Development : Systems Analysis & Design Introduction To Software Development : Systems Analysis & Design

Module Objectives At the end of the module, students should be able to: understand the term and concept of system analysis and design understand the concept of software engineering and its importance understand the concept of System Development Life Cycle (SDLC) To understand how to solve problem analytically To discuss the concept and importance of algorithm in developing programs To understand and create flow chart to organized information / data and the flow of process

Computer Systems System – an organized set of related components established to accomplish a certain task –Computer system – a system that has a computer as one of its components

Systems Analysis & Design Analysis - studying an existing system to determine how it works and how it meets users’ needs –Typically happens as a result of some impetus for change, combined with the authority to make the change Design - the process of developing a plan for an improved system, based on the result of the systems analysis

Individuals Involved in Systems Analysis Systems analyst – performs analysis and design –May perform some programming as well Client – the person or organization contracting to have the work done User – the people who will have contact with the system

What is software? Computer programs and associated documentation such as requirements, design models and user manuals. Software products may be developed for a particular customer or may be developed for a general market. Software products may be –Generic - developed to be sold to a range of different customers e.g. PC software such as Excel or Word. –Bespoke (custom) - developed for a single customer according to their specification

What is software engineering? Software systems are now ubiquitous. –Virtually all electrical equipment now includes some kind of software The specification, development, management and evolution of these systems make up the discipline of software engineering - an engineering discipline that is concerned with all aspects of software production. Software engineers adopt a systematic and organized approach to their work and use appropriate tools and techniques depending on the problem to be solved, the development constraints and the resources available.

Attributes of good software? The software delivered should : –Have required functionality –Have required performance –Be maintainable –Be dependable and usable.

Software Process A set of activities whose goal is the development or evolution of software. Generic activities in all software processes are: –Specification - what the system should do and its development constraints –Development - production of the software system –Validation - checking that the software is what the customer wants –Evolution - changing the software in response to changing demands.

Software Process Model (SPM) A simplified representation of a software process, presented from a specific perspective. A set of activities whose goal is the development or evolution of software Examples of process perspectives are –Workflow perspective - sequence of activities; –Data-flow perspective - information flow; –Role/action perspective - who does what. Example of generic process models –Waterfall, Iterative development, Spiral, rapid prototyping, etc

The Systems Development Life Cycle 1.Preliminary investigation 2.Analysis 3.Design 4.Development 5.Implementation Previously software development consisted of a programmer writing code to solve problem Nowadays as systems are so big and complex a set of procedure is needed to develop the software.

Waterfall Model (SPM)

Software Development Method

Introduction to Problem Solving Pseudocoding Flowcharting Program verification and testing Program documentation Software Development Methods

Introduction to Problem Solving A 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. Computers can be used to help us in doing problem solving. Problem solving (within the context of developing programs) refers to analysing a problem with the intention of deriving a solution for the problem.

The software development method consists of the following steps: 1.Specification of needs 2.Problem analysis 3.Design and algorithmic representation 4.Implementation 5.Testing and verification 6.Documentation Software Development Method (SDM)

1. Specification of Needs To understand exactly: –what the problem is –what is needed to solve it –what the solution should provide –if there are constraints and special conditions.

2.Problem Analysis In the analysis phase, we should identify the following: –Inputs to the problem, their form and the input media to be used –Outputs expected from the problem, their form and the output media to be used –Special constraints or conditions (if any) –Formulas or equations to be used

3. Design and Algorithmic Representation An algorithm is a sequence of a finite number of steps arranged in a specific logical order which, when executed, produces the solution for a problem. An algorithm must satisfy these requirements: –It must have an input –It must have an output –It should not be ambiguous (there should not be different interpretations to it) Every step in algorithm must be clear as what it is supposed to do

–It must be general (it can be used for different inputs) –It must be correct and it must solve the problem for which it is designed –It must execute and terminate in a finite amount of time –It must be efficient enough so that it can solve the intended problem using the resource currently available on the computer An algorithm can be represented using pseudocodes or flowcharts. 3. Design and Algorithmic Representation

pseudocodes A pseudocode is a semiformal, English-like language with limited vocabulary that can be used to design and describe algorithms. Criteria of a good pseudocode: –Easy to understand, precise and clear –Gives the correct solution in all cases –Eventually ends In 1966, two researchers, C. Bohn and G. Jacopini, demonstrated that any algorithm can be described using only 3 control structures: sequence, selection and repetition.

a. The sequence control structure –A series of steps or statements that are executed in the order they are written in an algorithm. –The beginning and end of a block of statements can be optionally marked with the keywords begin and end. –Example: begin read birth date from user calculate the difference between the birth date and today’s date print out the exact age of the user end

Statement 1 a. The sequence control structure Begin End

–Defines two courses of action depending on the outcome of a condition. –A condition is an expression that is either true or false. –The keyword used are if and else. b. The selection control structure

Begin Read age if age is greater than 55 print “retired” else print “still working” end_if End b. The selection control structure

Condition else- statement(s) then- statement(s) (12a) b. The selection control structure

c. The repetition control structure –Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied. –The keyword used is while. Condition Loop Statement(s)

Begin while user still wants to play Select either to play on network or play against computer if play on network create connection to remote machine play game with connected computer else select mission play game locally end_if Ask user whether he/she still wants to play end_while End c. The repetition control structure

Flowcharts Flowcharts is a graph used to depict or show a step by step solution using symbols which represent a task. The symbols used consist of geometrical shapes that are connected by flow lines. It is an alternative to pseudo coding whereas a pseudocode description is verbal, a flowchart is graphical in nature. Program flowcharts, because they are represented graphically, makes understanding easier.

Terminal symbol - indicates the beginning and end points of an algorithm. Process symbol - shows an instruction other than input, output or selection. Input-output symbol - shows an input or an output operation. Disk storage I/O symbol - indicates input from or output to disk storage. Printer output symbol - shows hardcopy printer output. Flowcharts Symbol

Selection symbol - shows a selection process for two-way selection. Off-page connector - provides continuation of a logical path on another page. On-page connector - provides continuation of logical path at another point in the same page. Flow lines - indicate the logical sequence of execution steps in the algorithm. Flowcharts Symbol

Begin Read Value1, Value2 Calculate Sum = Value1 + Value2 Display Sum End Read Amount Calculate Actual=Amount * 0.80 Calculate Actual=Amount NO YES End Begin Amount >20.00 ? Program Flowcharts

4.Implementation The process of implementing an algorithm by writing a computer program using a programming language (for example, using C language) The output of the program must be the solution of the intended problem

5.Testing and Verification Program testing is the process of executing a program to demonstrate its correctness Program verification is the process of ensuring that a program meets user-requirement After the program is compiled, we must run the program and test/verify it with different inputs before the program can be released to the public or other users (or to the instructor of this class)

6.Documentation Contains details produced at all stages of the program development cycle. Can be done in 2 ways: –Writing comments between your line of codes –Creating a separate text file to explain the program Important not only for other people to use or modify your program, but also for you to understand your own program after a long time (believe me, you will forget the details of your own program after sometime)

Documentation is so important because: –You may return to this program in future to use the whole of or a part of it again –Other programmer or end user will need some information about your program for reference or maintenance –You may someday have to modify the program, or may discover some errors or weaknesses in your program Although documentation is listed as the last stage of software development method, it is actually an on-going process which should be done from the very beginning of the software development process. 6.Documentation

Example of a problem Every year, XYZ staffs will be given a raise in their salary. The percentage of raise varies depending on the evaluation made by the Head of Department (HOD) The HOD will give each of the staff a score to indicate their performance of the year. (Table below shows the percentage raise for different performance level) Performance Score % salary raise Enter your current salary : RM Enter your performance score: 4 Your new salary is : RM Example of output: Write a pseudocode that can calculate the new salary of a staff (after a raise) given the current salary and the performance score.

This problem is straightforward  all the information required is given in the table. It should be clear that we need to calculate the new salary and the formula is not given. Figure out the formula. Then we can come up with the following specification of needs for our problem –A staff can determine his/her new salary by specifying his/her performance score and current salary –The new salary is calculated based on % raise of his/her performance score. 1. Specification of needs New salary = (current salary * % raise) + current salary

We have to develop a program to do the following: 1.Prompt the user to interactively enter his/her current salary 2.Prompt the user to interactively enter his/her performance score 3.Calculate the new salary 4.Output the new salary 1. Specification of needs

2. Problem Analysis In the analysis phase we should identify the following: –Input to the problem –Output/s from the problem –Any special constraints or conditions –Formula(s) or equation(s) to be used From the sample problem, we have the following: –Input - 2 inputs; current salary and performance score –Output – 1 output item is expected; new salary

Constraints – the program should not accept the performance score values beyond the range specified (1-5) Formula  2. Problem Analysis new salary = (current salary * % raise) + current salary

3. Design & Algorithm Representation For the given problem, we have to design an algorithm and verify its correctness Design must be done on paper, not just visualize in our minds. Therefore, we should be able to represent and document our algorithm using appropriate representation tools –Pseudocode and Flowchart

3. Design & Algorithm Representation Pseudocode Begin Read Performance Score, Current Salary Calculate New Salary New Salary = Current Salary + (Salary Raise(%) * Current Salary)) Display Current Salary, Performance Score, New Salary End

3. Design & Algorithm Representation

4.Implementation –This phase require you to start doing the programming – translate each of step of the algorithm into a statement in programming language. 5.Testing & Verification –In our sample, we should test our algorithm with performance score 1 to 5 to ensure that it calculates the correct income raise. –Ensure the program built meets user requirement. 4. Implementation 5. Testing & Verification

6. Documentation Document everything Program documentation consists of : –Concise requirement specification –Description of input/output, constraints, formula/s etc. –pseudocode or flowchart of the algorithm. –Source program (source code). –Hardcopy of sample test run (sample output)

Exercises Solve the following problem using SDM up to step no. 3 only Calculating Electricity Bills The unit for electricity usage is kWh. For domestic usage, the tariff used is tariff A. The monthly rate for tariff A is 21.8 cents/unit for the first 200 unit, 25.8 cents/unit for the next 800 units and 27.8 cents/unit for each additional units. Given the amount of electricity units (in kWh) used by a customer, calculate the amount of money needs to be paid by the customer to TNB. A bill statement needs to be printed out.