We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published bySamara Nuce
Modified over 2 years ago
Index for Software Development Analysis Design Implementation Testing Documentation Evaluation Maintenance Data Types / Structures Basic Operations Standard Algorithms Variables & Passing Parameters Functions / Sub Procedures Compilers / Interpreters Structured Listing © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 1 - Analysis Carried out by SYSTEMS ANALYST. Main Reason: To OBSERVE current systems and DESIGN new systems to replace them (Requirements Capture). Uses OBSERVATION of current system and users. INTERVIEWS with Management and potential end users. use of QUESTIONAIRES to get feedback from large numbers. End product is the REQUIREMENTS SPECIFICATION document that outlines the limits of the FUNCTIONALITY of the system and acts as the basis for any LEGAL CONTRACT. Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 2: Design Two different methods Start with the big problem and break it down into smaller sub problems until you get to the point you can code! Start with existing code modules and then build the program up around them (pre-written and pre- tested modules) Flow Diagrams Get 3 drive details Display all Drive Details Find Fastest Drive Display Fastest Drive details Find Fastest Example: Program to compare transfer rates of three DVD writers and then find fastest and display results. Time Use Case Diagrams Module Diagrams Psudocode & Stepwise Refinement Get file size Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 2: Design - Psudocode & Stepwise Refinement Stage 2: Design Example for find fastest of three drives: From the initial High Level Algorithm 1.Get file size 2.Get 3 drive details 3.Display all drive details 4.Find fastest drive 5.Display fastest drive details Using Psudocode & Stepwise Refinement 1.Get file size 1.1Get file size from user 2.Get 3 drive details 2.1For I = 0 to DriverName(i) = User Input 2.1.2DriverTransferRate(i) = User Input 2.1.3DriverTransferSpeed(i) = TransferRate 2.2Next I 3.Display all drive details 3.1For I = 0 to Display DriverName(i) 3.1.2Display DriverTransferRate(i) 3.1.3Display DriverTransferSpeed(i) 3.2Next I 4.Find fastest drive (using find min on DriverTransferSpeed) 4.1indexOfFastest = 0 4.2min = DriverTransferSpeed(0) 4.3For I = 0 to if Min < DriverTransferSpeed(i) then Min = DriverTransferSpeed(i) indexOfFastest = I 4.3.2End If 4.4Next i 5.Display fastest drive details 5.1Display “Fastest Drive Details as follows:” 5.1Display DriverName(IndexOfFastest) 5.2Display DriverTransferRate(IndexOfFastest) 5.3Display DriverTransferSpeed(IndexOfFastest) Psudocode: Close to English. Supports all “normal” functions, such as conditional / fixed loops and If statements etc. Not code specific. Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 3: Implementation – Choice of Language Choice of Language This stage involves coding the algorithms in a given language. The choice of language is dependant on several factors: Programming expertise Type of problem Hardware / Software compatibility Data types / structures available Features and constructs available Types of Language available Procedural Defined start / end point Sequential instructions Examples: ALGOL, Pascal, C Declarative Collection of Facts / Rules Uses Pattern Matching Examples: Hascal, Python Event Driven Object orientated – small modules of code run on detection of event i.e. mouse over, mouse left click etc. Program constantly runs listening for events Examples: Visual Basic, Visual Pascall Scripting Used to automate / extend functionality of an application Examples: using Visual Basic to extend functionality in Excel or Access, or Java script to extend functionality of HTML Use of java Applets on web Recording Macro in Excel Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 4: Testing Testing the Code Systematic testing: all errors found fully documented and results repeated Comprehensive testing: Cover all possible operational situations i.e. Test all validation, ensure all formula used produces expected, pre-calculated results and that all logical operations work correctly. Testing Validation: i.e. for number in range 0 to 100 Normal data – data in range – anything within subset 1 to 99 Boundary / Extreme data – data at the edges of normal range – 0 and 100 Exceptional data – data outside normal range and type - -1, 101, “two” Independent Test Group (ITG) – In house testing of code / modules / components, carried out by programmers Beta Testing – code tested under normal working conditions by set of trusted users. Results fed back to Development team. Acceptance Testing – code set up in normal working environment and used by all end users (may be run in tandem with existing system until everyone is happy that it works correctly). Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 5: Documentation Documentation is produced at each stage 1.Software Specification – Formal specification of scope / boundaries of project. Acts as basis for any legal contract. 2.Algorithms / Graphical Diagrams / Psudocode 3.Structured listing of code – Line numbers, comments, highlighting of key words, indentation, white space 4.Test report – List of test data used with expected and actual outcomes. May contain comments on processor use or known conflicts. 5.User Guide – Installation instructions and tutorials on how to use software. 6.Technical Guide – Technical requirements i.e. Operating System compatibility, Amount of RAM required, Disc space, known bugs, version details, upgrades, patches available. 7.Evaluation Report – Comparison of software produced to the original specification. Comments on Portability, Reliability, Robustness, Efficiency and Maintainability. Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 6: Evaluation Evaluation to ensure code is “Fit for Purpose” Ensure the finished code matches the original Software Specification as well as Robustness: Ability of the code to cope with errors at run time without crashing! Examples: Type Errors (“two” typed in instead of 2), Not crashing if out of range data entered Reliability: Software operates correctly without stopping due to design faults, Gives correct and predictable output as results Portability: Ability of software to run on different systems to that it was designed for with little or no changes required to the code. Examples: Run on a machine with different Operating System, Processor Efficiency: In terms of memory usage and processor time the software uses Maintainability: Readability of code (structured listing), use of modules, language used, use of sub procedures / functions Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Stage 7: Maintenance Maintenance is carried out on software after it has been delivered to the client. Corrective Maintenance: Fix errors / bugs not picked up during testing phase. Software company pays for this. Adaptive Maintenance: Adapt software to a change in it’s environment, such as change of Operating System / Hardware Client pays for this as it is outside original specification. Perfective Maintenance: Add new features / functionality requested by client. Client pays for this as it is outside original specification Back to Index © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Data types and Structures Numbers Integers are SOLID numbers with no decimal place. They can be Positive or Negative REAL numbers are the numbers in between The integers which can carry on infinitely after the decimal place. Declaring variables Dim MarkOutOfTen as Integer (as number will be solid) Dim Temperature as Real (as number will probably contain a decimal place) Dim Name as String (as it will contain a “string” of characters) Dim GameOn as Boolean (This has two possible values, either True or False) Back to Index Arrays © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Data types and Structures Arrays Back to Index Dim MarkOutOfTen (10) as Integer This will give us a linear array of integers that can be addressed by their index positions in the array. (note that the count goes from 0 to 9) MarkOutOfTen (0) contains 1 MarkOutOfTen (9) contains 2 Pos 1 Pos 2Pos 3 Pos 4 Pos 5Pos 6Pos 7 Pos 8 Bill TedJulieJohnPeteAgnesJoeSteveLaurenKim Dim Names (10) as String This will give us a linear array of strings of characters that can be addressed by their index positions in the array. (note that the count goes from 0 to 9) Names (0) contains “Bill” Names (9) contains “Kim” Pos 1 Pos 2Pos 3 Pos 4 Pos 5Pos 6Pos 7 Pos 8 The beauty of creating arrays is that they can hold the data in a structured way that makes it easier and faster to load them and carry out checks on their contents. For instance, to load the ten names into the Names(10) array we can use a simple for loop like so: Dim Names (10) as String For I = 0 to 9 Names (i) = inputbox(“please enter name “ & i+1) Next I And to print them all out all we need is the following: For I = 0 to 9 LstDisplay.additem(“name “ & i+1 & “: “ & Names(i)) Next I For other ways of using arrays usefully see the Standard Algorithm section of this presentation Numbers © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Basic Operations - String Concatenation & Substrings Back to Index All examples are in Visual Basic String Concatenation: We use string concatenation to join strings of text and variable contents together to make the output more meaningful. Example: Dim name as string Dim age as integer name = inputbox(“Please enter your name”) age = int(inputbox(“Please enter your age”) LstDisplay.additem(“Hello “ & name & “. You are “ & age & “ years old.”) (Notice how all the strings of text begin and end with “ “) Substrings: Sometimes we only need part of a string of text. We can normally use Library Code from the programming language to do this very quickly. Let’s imagine that we need to create an ID number from the first six letters of a persons name concatenated with their year of birth: Example: Dim Name as String Dim Year as Integer Name = inputbox(“Please enter your surname. It must be at least 6 characters long. If not please pad out with * i.e. Cox***””) Year = int(inputbox(“Please enter your Year of Birth in the form of four characters i.e. 1987”) LstDisplay.additem(“Your password is“ & left$(6, name) & Year) left$(6, name) left$ is the name of the Library Sub Procedure. It takes in two parameters firstly the number of characters you want (6) and then the String you want them from. Formatting input / Output Multiple Outcome selection © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Basic Operations – Formatting I/O and Multiple Outcome Selection Back to Index All examples are in Visual Basic Formatting Input: We need to ensure that when we get data in from the user that it is of the same type as the variable. Example: When we get data in from an inputbox, it has a default to return a String representation So Dim name as string Dim age as integer name = inputbox(“Please enter your name”) Expecting a String Returns a String age = inputbox(“Please enter your age”) Expecting an Integer Returns a String So we need to use a Library Sub Procedure to change the String into an Integer age = Int(inputbox(“Please enter your age”)) Int(“17”) will return the binary formatted number for 17 Formatting Output: We often need to round down Real numbers to a set number of decimal places, so we use Library code again LstDisplay.additem(“Percentage Increase: “ & format(percentage, “0.00”) & “%”) If the percentage is this will display as “Percentage Increase: 57.99%” Likewise if we want a particular currency displayed we can do the same thing LstDisplay.additem(“Total Bonus “ & format(Bonus, “£0.00”)) If the value held in bonus is this will display as “Total Bonus: £567.89” String Operations © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Standard Algorithms Back to Index Find Min 1.Set min to equal first array item 2.For each array item 3. If Min > current array item 4. Min = current array item 5.Get next array item 6.Return Min Find Max 1.Set max to equal first array item 2.For each array item 3. If Max < current array item 4. Max = current array item 5.Get next array item 6.Return Max Count Occurrences 1.Get value from user 2.Set Counter to zero 3.For each array item 4. If value = current array item 5. Counter = Counter Get next array item 7.Return Counter Linear Search 1.Get value from user 2.For each array item 3. If value = current array item 4. FoundAt = current position 5.Get next array item 6.Return FoundAt © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Variables & Passing Parameters Back to Index Variables – Global v Local Global Variables: Declared as global at the top of the Program Exist as long as program is running Can be seen by all sub procedures Do not require to be passed as parameters to change Problem: Can be changed by accident! Local Variables: Declared within sub procedures / functions Only last while sub procedure / function runs Cannot be seen by other sub procedures / functions Have to be passed between modules explicitly Parameter Passing (passing variables between sub procedures / functions) By Reference (Actual Variable passed in and out) Actual memory location containing value is passed Any changes to value held in variable are stored at it’s location Changes reflect throughout rest of program By Value (Copy of variable value passed in only) Copy of data held at variables address is passed into sub procedure / function Any changes to value only last as long as sub procedure / function runs unless passed explicitly. © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Functions / Sub Procedures - Functions Back to Index Functions Functions RETURN something! Example: Lets imagine we need to write a function that takes in two parameters being Filesize in Megabytes. and TransferRate in Megabits per second. The function when called should return the transfer time of the file in seconds. Private function CalcTransferRate(byVal Filesize as integer, byVal TransferRate as integer) as real CalcTransferRate = (Filesize * 8) / TransferRate End function If we input a File size of 650 Megabytes and a Transfer Rate of 1 Megabit / second (normal for cheap broadband) the function should return the result of (650*8) / 1 = 5200 seconds If we keep the file size the same and increase the Broadband rate to 8 Megabits per second then we should get (650*8) / 8 = 650 seconds See Sub Procedures © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Functions / Sub Procedures – Sub Procedures Back to Index Sub Procedures Sub procedures DO something! Example: Lets imagine we need to write a program that takes in a file size and details of three ISPs. The program needs to store the names of the ISPs, their transfer rates and the speed at which they can transfer the file in three arrays. We can use the CalcTransferSpeed function from the function example to assist us. Dim ISPNames(3) as String Dim TransferRates(3) as Integer Dim TransferSpeeds(3) as Real Dim Filesize as Integer Private sub RunMainProgClick() Filesize = int(inputbox(“Please enter file size in Megabytes”)) GetDriveDetails(ISPNames, TransferRates, TransferSpeeds) End sub Private sub GetDriveDetails(byrefl ISPNames, byRef TransferRates, byRef TransferSpeeds, byVal Filesize ) For I = 0 to 2 ISPNames(i) = inputbox(“Please enter name of ISP “ & i+1) TransferRates(i) = Int(inputbox(“Please enter transfer rate in Megabits / second for ISP ” & i+1)) TransferSpeeds(i) = CalcTransferSpeed(Filesize, TransferRates(i)) next i End sub See Functions © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Compilers / Interpreters Back to Index All programs are written in High Level Programming Languages which are Close to English Easier for Humans to understand / spot errors But computers only understand Machine Code Binary Instructions and Data Values Therefore there is a need to TRANSLATE High level Language into Machine Code Two different approaches 1.Interpreter: Converts one line of High Level Language at a time and runs it Stops if it finds an error and points to the error location Easier to spot mistakes and rectify them, therefore ideal for initial implementation Code runs more slowly due to need for constant Translation 2.Compiler: Converts all High Level Language into machine code and stores it as an executable program If it finds errors it just stops, may point out line number where error was found Final code runs a lot faster, therefore ideal to use for converting final program at end of implementation / testing phase. © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
‘Program: Calculate File Transfer speeds ‘Programmer: Steve Clulow ‘Last Update: 30/4/07 1.Dim ISPNames(3) as String 2.Dim TransferRates(3) as Integer 3.Dim TransferSpeeds(3) as Real 4.Dim Filesize as Integer 5.‘ ‘Main Program 7.Private sub RunMainProgClick() 8. Filesize = int(inputbox(“Please enter file size in Megabytes”)) 9. GetDriveDetails(ISPNames, TransferRates, TransferSpeeds) 10. DisplayAllDetails (ISPNames, TransferRates, TransferSpeeds) 11. DisplayFastestDriveDetails(ISPNames, TransferRates, TransferSpeeds) 12.End sub 13.‘ ‘Sub procedure GetDriveDetails gets all three names and Transfer Rates and calculates Transfer Speed 15.Private sub GetDriveDetails(byrefl ISPNames, byRef TransferRates, byRef TransferSpeeds, byVal Filesize ) 16. For i = 0 to ISPNames(i) = inputbox(“Please enter name of ISP “ & i+1) 18. TransferRates(i) = Int(inputbox(“Please enter transfer rate in Megabits / second for ISP ” & i+1)) 19. TransferSpeeds(i) = CalcTransferSpeed(Filesize, TransferRates(i)) 20. next i 21.End sub Structured Listing Back to Index Indentation Comments Clear marking of Sub Procedure Line Numbers Highlighting Key Words © Steve Clulow BSc, Greenfaulds High School, Cumbernauld
Computing Higher - SD Process – Topic 2 St Andrew’s High School Unit 2 Software Development Process.
9.1 9 Programmin g Languages Foundations of Computer Science Cengage Learning.
2 Welcome To Defect Management Training Objective: The objective of this course is to learn about standards that emphasize a best practice approach for.
MT311 (Oct 2007) Java Application Development Control Structures, Subprograms and Its Implementation Tutorial 7.
1001ICT Programming 1 Semester 1, 2011 Lecture 8 Course Review 1.
SAPScript Forms. SAPScript Form Components SAPScript Form Components A form of the graphical Form Painter consists of five components. In alphanumeric.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Index for Computer Systems Binary Representation Integers Binary Representation Floating Point (Reals) Bitmap Graphics Vector Graphics Binary Representation.
Methods for Software Specification Jan Kožusznik. Dept. of Computer Science Technical University of Ostrava
Session # 2 [Introduction to Computers] What is Computer ? A computer is a machine that manipulates data according to a list of instructions. Machine.
C How to Program, 6/e © by Pearson Education, Inc. All Rights Reserved.
1 CM Programming with Java Chapter 1 Getting Started.
Software development process. Explanation of the iterative nature of the software development process.
Unit 1B – Capabilities & limitations of ICT. Capabilities & limitation of ICT ICT vs Manual methods of data processing Case Study – the school reporting.
Unit-V -SOFTWARE QUALITY. To develop and deliver robust system, we need a high level of confidence that Each component will behave correctly Collective.
Project Management in Team Software Projects The primary challenge of project management is to achieve all of the goals of the project charter while adhering.
Chapter 1, Slide 1Starting Out with Visual Basic 3 rd Edition Chapter 1 Introduction to Programming and Visual Basic 2005.
C HAPTER 1 Computer Organization and Architecture.
CSC Proprietary 2/11/2014 3:44:12 AM 008_P2_CSC_white 1 Active Server Pages (ASP)
Tutorial on Python Programming Chetan Giridhar January 19, 2014.
Testing Relational Database. Overview Once the design of a database system has been completed, the developers are ready to move into the implementation.
Getting started With Excel Getting started With Excel.
Design Patterns. Patterns 1, 2, 3, … is a sequence that exhibits the pattern: The integers in their natural order.
The ESC-QuickBooks Integration For Use with ESC Version 12.
MT311 (Oct 2007) Java Application Development Variables – binding, type, and scope Expression Tutorial 6.
What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals: Execute.
Copyright © 2009 Elsevier Chapter 3:: Names, Scopes, and Bindings Programming Language Pragmatics Michael L. Scott.
Chapter 7 Problem Solving and Algorithms. 2 Problem Solving How to Solve It: A New Aspect of Mathematical Method by George Polya "How to solve it list"
10-1. Systems Analysis & Programming 10.1 Systems Development 10.2 Programming: A Five-Step Procedure Generations of Programming Languages 10.4.
© 2016 SlidePlayer.com Inc. All rights reserved.