1 / 66

The Software Development Process – 4 hours

The Software Development Process – 4 hours. The Software Development Process. The SDP consists of seven main stages that are followed to develop software. They are:. Analysis Design Implementation Testing Documentation Evaluation Maintenance. Software Development Process.

cespino
Download Presentation

The Software Development Process – 4 hours

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Software Development Process – 4 hours Higher Software Development

  2. The Software Development Process The SDP consists of seven main stages that are followed to develop software. They are: • Analysis • Design • Implementation • Testing • Documentation • Evaluation • Maintenance Software Development Process Higher Software Development

  3. The iterative nature of the SDP The SDP is iterative as any of the stages may be revisited throughout the project. Example: If an error is found in the maintenance stage (after release) then the implementation stage will be revisited to fix the code. Software Development Process Higher Software Development

  4. The Software Specification The Software Specification is a document that defines the scope and boundaries of the project and becomes legally binding between the client and the developers. Software Development Process Higher Software Development

  5. Personnel involved the SDP Client - commissions the software project as a result of an identified ‘need’. Systems Analyst – Investigates the client’s current system and designs the new or upgraded system. Project Manager – Project leader who manages the project and the development team. Ensures deadlines being met and resources are in place. Programmer – Implements the designs (pseudocode etc.) into program code. Independent Test Group – tests the software to identify any errors by testing subroutines, modules and the completed program. Software Development Process Higher Software Development

  6. Analysis The SystemsAnalyst meets with the client, interviews and observes users of the current system and identifies what the program has to do, in a process known as Requirements Elicitation. The result is the production of the Software Specification. Software Development Process Higher Software Development

  7. Design The design process is methodical and involves designing and representing algorithms as pseudocode and/or structure diagrams. Software Development Process Higher Software Development

  8. Design Algorithm An algorithm is a sequence of actions that, when performed in the correct order, will solve a problem or task in a finite number of steps. Example: Here is a simple algorithm to convert a Fahrenheit temperature to Celsius: 1 Subtract 32 from Fahrenheit temperature 2 Multiply by 5/9ths to get Celsius temperature So, 98.6°F - 32 = 66.6 66.6 * 5/9ths = 37°C What happens if you swap steps 1 and 2 - do you get the same answer? Software Development Process Higher Software Development

  9. Design Pseudocode Pseudocode is a design notation that combines English language and Maths with programming language constructs. Software Development Process Higher Software Development

  10. Design Pseudocode Here is the Fahrenheit conversion algorithm represented as pseudocode to be implemented as program code: 1.1 Get temp(°F) 1.2 Set temp(°F) = temp(°F)-32 1.3 Set temp(°C) = temp(°F)*0.556 1.4 Display temp(°C) Software Development Process Note: Pseudocode is not specific to any programming language. It is a design notation that can be implemented by programmers in any programming language Higher Software Development

  11. Design Structure Diagram A Structure Diagram is another design notation that represents algorithms in a chart or graphical form Here is the Fahrenheit conversion algorithm represented as a structure diagram to be implemented as program code: Software Development Process Covert °F to °C 1.2 Set temp(°F) = temp(°F)-32 1.3 Set temp(°C) = temp(°F)*0.556 1.4 Display temp(°C) 1.1 Get temp (°F) Higher Software Development

  12. Design Flow chart A flow chart is another design notation that shows the sequence of operations required to complete a task. This chart shows the sequence of reading customer accounts and calculating the amount due for each customer. After an account has been processed, the program loops back to process the next one. Software Development Process Higher Software Development

  13. Design Top-down design Is the process of breaking a problem down in to sub-problems. Top-down design is where a task or problem is broken down into stages that can be solved as individual parts. Software Development Process This structure diagram illustrates a top-down approach to identifying the stages of the problem solution. Higher Software Development

  14. Design Stepwise Refinement Stepwise-refinement is the process of refining stages down into steps. Each step can then be coded in a programming language. Software Development Process Higher Software Development

  15. Implementation This is where the programmer(s), overseen by the project manager, convert the pseudocode (algorithms) into programming code e.g. Visual Basic, C++, Java etc. Pseudocode 1.1 Get temp(°F) 1.2 Set temp(°F) = temp(°F)-32 1.3 Set temp(°C) = temp(°F)*0.556 1.4 Display temp(°C) Software Development Process ‘Program Code tempF = txtTempF.Text tempF = tempF-32 tempC = tempF*0.556 lblTempC = temp(°C) A formatted printout of the program code is known as a structured listing. It includes indentation, white space and internal commentary. Higher Software Development

  16. Testing Testing should be both systematic and comprehensive i.e. methodical with test reports of predicted and actual results kept, and tested under all operational situations with a full range of test data. The three types of testing are normal, extreme and exceptional. Example Program should only accept whole values in the range 0 to 100: Normal data: 2, 34, 66 etc. Extreme data: 0,100 Exceptional: -1, 156, abc, 2.9 etc. Software Development Process Acceptance (beta) testing is when independent test groups and/or the client try out the software and report back any bugs to the development team prior to final release. Higher Software Development

  17. Documentation To produce documentation to be distributed with the software. The two main documents are the user guide and the technical guide. 1 User Guide A set of instructions on how to install and use the software perhaps including tutorials and FAQS. Can be in both a booklet or electronic format. Software Development Process 2 Technical Guide Describes hardware requirements e.g. CPU, RAM space on hard disk etc. Higher Software Development

  18. No design faults Does not crash Copes with errors Correct output Reliable Robust Does the program meet the spec? Fit for purpose Evaluation Portable Maintainable Cross platform Efficient Modular i.e. uses procedures and functions. Readable i.e. internal commentary, indentation etc. Low processor and memory overheads Evaluation An evaluation report is prepared and supplied to the client with the release of the software. Software Development Process Higher Software Development

  19. Maintenance Begins once the software has been released and put into use. Involves the client who uses the software and the programmers to make any necessary changes. There are 3 types of maintenance. Corrective: Fixing any errors that were not detected during the testing phase. Adaptive: To alter the software to work with a new operating system or new hardware. Perfective: Add new functionality at the request of the client. Software Development Process Corrective maintenance is part of the contract whereas adaptive and perfective are usually at additional expense to the client. Higher Software Development

  20. Languages and Environments – 6 hours Higher Software Development

  21. Sample Pascal code Procedural Languages Programs follow a sequence from start to finish and can be split into sub-programs called procedures. Languages and Environments Languages such as Pascal, Comal and Basic are procedural and nowadays are mainly used for learning programming. Higher Software Development

  22. Declarative Languages Declarative (logic) programming has no fixed start or end point; are collections of facts and rules; and use pattern matching to answer queries. Here are some facts: Parent (Liz, Tom). means that Liz is a parent of Tom Female (Liz). means that Liz is female Male(Tom). Parent(Bert, Tom). Languages and Environments Here is a rule: Mother(X, Y) :- means that X is a mother of Y IF Parent(X, Y), Female(X) X is a parent of Y AND X is female! Query could be Mother(X, Tom) which would give the answer X=Liz Declarative languages such as Prolog and LISP are used predominantly in the field of Artificial Intelligence. Higher Software Development

  23. The code is executed in response to events e.g. form load, button click etc. Event-driven Languages An object-oriented programming paradigm where objects on the interface have their own code attached e.g. a command button. Languages and Environments Visual Basic and Java are examples of event-driven languages. Higher Software Development

  24. Translators Programs written in high-level languages need to be translated into low-level (machine code) for processing and executing by the CPU. This is done by a translator program. • There are two types of translator program: • interpreters • compilers Languages and Environments Higher Software Development

  25. Interpreters Interpreter programs translate HLL code into machine code one line at a time. • Advantages: • easy to find errors • good for learners • Disadvantages: • programs slow as have to be continually interpreted • interpreter program always in memory Languages and Environments Higher Software Development

  26. Compilers A Compiler program translates the whole program (source code) into a machine code version (object code) that can be run without the compiler being present. • Advantages: • programs execute fast as CPU ready • translator program only needed at the time of compiling • different compilers can be written for different platforms. Languages and Environments • Disadvantages: • slow to compile as whole program translated • also may not run if syntax errors. Higher Software Development

  27. Scripting Languages Programs written as scripts are used to automate or extend the functionality of software applications. A Macro is a script written in Visual Basic for Applications (VBA). The user records a series of actions in an application such as MS-Excel. Code is generated and saved as a program script. The macro can then be assigned to a keystroke. Used to simplify and repeat complex or frequently used commands. Languages and Environments Higher Software Development

  28. Module Libraries A Module Library is a pre-written and pre-tested collection of subroutines and functions which the programmer can use to aid the development of the final program. Advantages include: • No code has to be written for problems already solved • The code will have been checked for any errors • The modules will be well documented Languages and Environments Higher Software Development

  29. HLL Programming Constructs – 14 hours Higher Software Development

  30. ‘Example first = “Good “ second = “morning!” whole = first & second lblMsg.Caption = whole ‘Example first = mid$(“Phil”,1,1) second = mid$(“Mitchell”,1,1) initials = first & second lblMsg.Caption = initials String Operations The two string operations are concatenation and substrings. Concatenation is the joining together of two strings. This example will output “Good morning!” to a text box. HLL Programming Constructs Substrings are parts of strings that are extracted and used in some way. This example will output “PM” to a label. Higher Software Development

  31. ‘Example lblMsg.Caption = “The total is “ & total & “!!” Formatting of Input / Output Data can be input via text boxes, input boxes etc. Data can be output to the screen by setting properties such as font, colour etc. Concatenation can be used to output strings and numerical data. HLL Programming Constructs Use of pre-defined functions may also format output. ‘Example txtAve.Text = Format(average,”.00”) Higher Software Development

  32. Multi-way Selection The CASE statement improves the IF..THEN..ELSE construct where more than two conditions are possible. ‘Algorithm using nested IFs If mark >= 70 Then grade = “A" Else If mark >= 60 Then grade = “B“ Else If mark >= 50 Then grade = “C" Else grade = “Fail" End If End If End If ‘Implement using CASE Select Case mark Case Is >= 70 grade = “A" Case Is >= 60 grade = “B" Case Is >= 50 grade = “C" Case Else grade = “Fail" End Select HLL Programming Constructs CASE makes the code more readable so aids maintenance. Higher Software Development

  33. Variables A variable is the name used to store a single item of data within a program. Examples Integer variables store whole numbers e.g. Dim age As Integer Real variables store decimal numbers e.g. Dim price As Single String variables store text e.g. Dim pname as String Boolean variables store either TRUE or FALSE e.g. Dim Swaps As Boolean HLL Programming Constructs Higher Software Development

  34. 1D Arrays An array is a name given to a list of items of data in a program. The list is stored in contiguous memory locations. Here is an array nums(10) of integers between 1 and 9: HLL Programming Constructs Here is some VB code to setup and array: ‘Example: 1D array Dim nums(10) As Integer Here is some VB code that would input data to an array: ‘Example: Input to array For c = 1 To 10 nums(c) = inputbox(“Enter number etc. List1.additem nums(c) Next c Higher Software Development

  35. Modularity Well written code makes use of modular programming. This simply means that programs are organised into modules or sub-programs. • Advantages • Each sub-program can be developed and tested as a standalone program • Bugs can be located within a specific sub-program • Maintenance can be carried out on each • Programs can be sub-divided and developed by many programmers HLL Programming Constructs The two main types of modules are subroutines (procedures) and functions. Higher Software Development

  36. Procedures A procedure is a subroutine that performs a specific task in a program. Here’s how to create a procedure in VB6: Private Sub InputNames() Statements End Sub HLL Programming Constructs • A procedure can be invoked by: • an event e.g. Private Sub cmdCalculate_Click() • being called when needed e.g. Call Validate Higher Software Development

  37. Functions A function is a subroutine that always returns a value e.g. a function could be used to return the result of a calculation. Here’s how to create a function in VB6: Private Function CalcTax () As Single Statements End Function HLL Programming Constructs If CalcTax()was a function then you could return a value to a label e.g. lblAmount.Caption = CalcTax() Note: The value returned from the function must always be assigned to a variable or a control! or you could return a value to an expression e.g. Amount = Estimate * .2 + CalcTax()* .14 Higher Software Development

  38. User-defined Functions A user-defined function is a subroutine that is coded by the user and ‘called’ by another section of program code. It does not depend on an event. HLL Programming Constructs Higher Software Development

  39. Global Variables Global variables are declared at the start of a program and can be used anywhere in the program. HLL Programming Constructs • Pros and cons • Can be used anywhere in the program • Declared once at the start • If value changes then changes for the rest of the program • Can be changed by mistake Higher Software Development

  40. Local Variables Local variables are declared within a procedure or function and can only be used by that subroutine. HLL Programming Constructs • Pros • Different variables can have the same name • Save memory as created and destroyed during subroutine runtime • Make subroutines ‘standalone’ so easy to reuse in other programs • Reduce risk of accidental change of global value Higher Software Development

  41. age = 25 variable parameter Subroutine IN Subroutine IN OUT Parameter Passing A parameter is simply the value of a variable that can be passed between subroutines. • The two methods of parameter passing are: • By reference (in and out) HLL Programming Constructs ii. By value (in) Higher Software Development

  42. Subroutine B Private Sub check (ByRef age) age = 25 42 age 25 age 25 age = 42 age age 42 By reference Parameter passed is the actual variable itself. Any changes to the parameter persist beyond the call i.e. change the original value. Subroutine A HLL Programming Constructs Note: An array should always be passed by reference due to memory overheads. Higher Software Development

  43. 25 42 25 By value A copy of the current value of parameter is passed in and any changes do not affect the original value. Subroutine A Subroutine B alias Private Sub check (ByVal a) age = 25 HLL Programming Constructs age a a = 42 Note: In sub B the variable a is an alias i.e. a copy of the actual parameter. a Higher Software Development

  44. Advantages of parameter passing • There are a number of advantages: • Greater control of data flow • Reduced risk of accidental change • More efficient use of memory • Sub-programs are more ‘self-contained’ • Improved reliability and robustness HLL Programming Constructs Here’s how to pass parameters in VB6: Call AddVat(cost, total) Private Sub AddVat (ByVal c, ByRef total) statements End Sub Higher Software Development

  45. Standard Algorithms – 12 hours Higher Software Development

  46. Pseudocode VB6 Code 1 Input Validation Validates program input and rejects invalid data. 1.1 Get and store value 1.2 Loop WHILE data is out with range 1.3 Display error message 1.4 Prompt user to re-enter value 1.5 End loop Standard Algorithms num =InputBox (“Enter number between 1 and 10”) Do While num < 1 Or num > 10 MsgBox “Must be num between 1 and 10” Num =InputBox (“Enter number between 1 and 10”) Loop Higher Software Development

  47. Pseudocode VB6 Code 2 Linear Search Searches a list for a target value. 2.1 Get and store target value 2.2 Loop for each item in the list 2.3 If current item = target value THEN 2.4 Display item and its location in list 2.5 End if 2.6 End loop Standard Algorithms target = InputBox (“Enter target value”) For p = 1 To 10 If array(p) = target Then picResult.Print target & “found at position “ & p End If Next p Higher Software Development

  48. Pseudocode VB6 Code 3 Counting Occurrences Counts the number of times (frequency) 3.1 Set counter = 0 3.2 Get and store target value 3.3 Loop for each item in the list 3.4 If current item = target value THEN 3.5 Increment counter 3.6 End if 3.7 End loop Remember to output e.g. to a label or control array etc. Standard Algorithms times = 0 target = InputBox (“Enter target value”) For p = 1 To 10 If array(p) = target Then times = times + 1 End If Next p Higher Software Development

  49. Pseudocode VB6 Code 4 Finding Maximum Find largest value in a list. 4.1 Set max = first item 4.2 Loop for each remaining item in the list 4.3 If current item > max then 4.4 Set max = current item 4.5 Set position = counter 4.6 End if 4.7 End loop Standard Algorithms max = array(1) For p = 2 To 10 If array(p) > max Then max = array(p) pos = p End If Next p Higher Software Development

  50. 5 Finding Minimum Finds the smallest value in a list…. Standard Algorithms Higher Software Development

More Related