Index for Software Development AnalysisDesignImplementationTestingDocumentationEvaluationMaintenanceData Types / StructuresBasic OperationsStandard AlgorithmsVariables.

Slides:



Advertisements
Similar presentations
Software development process. Explanation of the iterative nature of the software development process.
Advertisements

Index for Software Development
Programming Paradigms and languages
P5, M1, D1.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Implementation and Testing.
VBA Modules, Functions, Variables, and Constants
Introduction to a Programming Environment
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
Principles of Procedural Programming
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Systems Life Cycle A summary of what needs to be done.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Languages and Environments Higher Computing Unit 2 – Software Development.
1 Shawlands Academy Higher Computing Software Development Unit.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Tutorial 11 Using and Writing Visual Basic for Applications Code
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
1 Software Development Topic 1 The Software Development Process.
I Power Higher Computing Software Development The Software Development Process.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
Software Development Homework Revision Ex 2. State two tasks carried out by the project manager during the development of software Oversees whole project.
I Power Higher Computing Software Development Development Languages and Environments.
The Software Development Process
I Power Higher Computing Software Development High Level Language Constructs.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
Top-down approach / Stepwise Refinement & Procedures & Functions.
Intermediate 2 Computing Unit 2 - Software Development.
Software Development Process Higher Computing Unit 2 – Software Development.
 Software Development Life Cycle  Software Development Tools  High Level Programming:  Structures  Algorithms  Iteration  Pseudocode  Order of.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Design and Development Development Methodoligies Computing Science.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
Unit 2 Technology Systems
Topics Designing a Program Input, Processing, and Output
VBA - Excel VBA is Visual Basic for Applications
COMPUTATIONAL CONSTRUCTS
High and low level languages
Higher Software Development
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
CSCI-235 Micro-Computer Applications
Different Types of Testing
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Loop Structures.
About the Presentations
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Intro to PHP & Variables
Unit# 8: Introduction to Computer Programming
PROGRAMMING METHODOLOGY
Topics Introduction Hardware and Software How Computers Store Data
Coding Concepts (Basics)
Chapter 1 Introduction(1.1)
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Software Development Process
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Topics Designing a Program Input, Processing, and Output
Software development process
Tonga Institute of Higher Education IT 141: Information Systems
Topics Designing a Program Input, Processing, and Output
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

Index for Software Development AnalysisDesignImplementationTestingDocumentationEvaluationMaintenanceData Types / StructuresBasic OperationsStandard AlgorithmsVariables & Passing ParametersFunctions / Sub ProceduresCompilers / InterpretersStructured Listing

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

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

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

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

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

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

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

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

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 IndexArrays

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 BillTedJulieJohnPeteAgnesJoeSteveLaurenKim 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

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

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

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

Variables & Passing Parameters Back to Index Variables – Global v Local 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.

Functions / Sub Procedures - Functions Back to Index Functions Functions RETURN something! Example: Private function CalcTransferRate(byVal Filesize as integer, byVal TransferRate as integer) as real CalcTransferRate = (Filesize * 8) / TransferRate End function See Sub Procedures

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

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.

‘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