1 / 134

Software Development

Software Development. Int2/Higher. Software. What is software? All programs that allow hardware to do something useful and interesting You probably use several different pieces of software every day/week Examples? What is hardware? Everything that you can touch. Software.

dympna
Télécharger la présentation

Software Development

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. Software Development Int2/Higher

  2. Software • What is software? • All programs that allow hardware to do something useful and interesting • You probably use several different pieces of software every day/week • Examples? • What is hardware? • Everything that you can touch

  3. Software • A piece of software is simply a list of instructions that are fed to the computer and executed • It is therefore important that these instructions are in the correct order and the instructions themselves are correct

  4. Questions • What is the meaning of the term hardware? • Give three examples of software. • Complete the following table:

  5. The Development Process • The software development cycle is a systematic approach to producing software. The software development life cycle can be summed up in the following stages: • Analysis • Design • Implementation • Testing • Documentation • Evaluation • Maintenance

  6. Development Process It can be difficult to remember all of these stages in order. This little mnemonic might help. Or, you might develop your own. A Dance In The Dark Every Monday ocumentat ion valuation aintenance nalysis esign mplementation esting

  7. Software Development Process • Analysis – To look at the problem and determine what the solution might be. Use existing systems or write a new program? Turn the rough idea into an exact description. What are the inputs and outputs? What type of computer will it be run on? All of these questions must be answered at this stage.

  8. Who does it? • The systems analyst is the person who is responsible for the analysis stage

  9. Skills of the Systems Analyst • Usually a skilled and experienced programmer • Good people skills • Good communication skills

  10. What do they do? • Interview clients • Observation notes – of existing practice • Questionnaires • All of these are categorised as requirements elicitation

  11. The Importance of Being Analytical • The systems analyst has to be very detailed and accurate • So the rest of the process runs smoothly • Examples of what could go wrong? • After requirements elicitation the analyst will create a requirements specification (program/problem specification) – contains a full problem description, inputs and outputs etc

  12. Put the following in the correct order • 1. Create a user manual • 2. Get the team together to discuss what the game’s purpose is and what kind of things the player will be able to do • 3. Create the game • 4. Fix the problems found in testing. Produce downloadable updates for the game • 5. Design the games characters and worlds. Produce a plan for when certain parts of the game should be finished • 6. Make sure the game works properly • 7. Allow some people to play the game and ask them what they think of it

  13. Blob Diagram(analysis) • Used to determine the inputs and outputs to a program, using tea example: sugar Tea bag Used tea bag Making tea water Boiled water milk Cup of tea

  14. Blob Diagram • Create a blob diagram for the following program • A program that asks the user the length and breadth of a floor in metres. It will also ask the user the price of the carpet they will use (in m2) and then tells the user how much carpet will be required and the total cost • When you have done this, try to create the program in Visual Basic

  15. Higher The 7 stages of the SD Lifecycle Analysis – What happens here, who does it, how do they do it and what do they produce Techniques – what techniques are used Int2 The 7 stages of the SD Lifecycle Analysis: What happens at this stage and what is produced Blob diagram Blog Entry: The Software Development Lifecycle

  16. Software Development Process • Design – jumping straight into coding a program is not a good idea. This stage is important as the details of the program are worked out here. Things like how the screen will look, how the user will interact with the program and how the program might be structured. There are a variety of design methods. Pseudocode and structure diagrams are two of the most common.

  17. Pseudocode Like an English version of the program but can have code in it too if the designer knows how they will code it If done properly the pseudocode should match the program line for line Take making a cup of tea as an example 1. Fill kettle 2. Boil kettle 3. When kettle boiled pour hot water in cup 4. Add tea bag, milk and sugar 5.Stir We can then use this as the design for our program

  18. Your turn • Write the Pseudocode for the following: • A program that asks the user which times table they wish to be displayed. The program will then display that times table in a list box

  19. Structure Diagram • Fairly simple, take the tea making example Making tea Fill kettle Boil kettle When kettle boiled pour into cup Add milk, sugar Stir

  20. Area of rectangle Get sizes Calculate area Display area Find out length Find out breadth Area = length x breadth Structure Diagram(with data flow) • Indicates what variables are passed in and out of procedures Length breadth Length breadth area area

  21. Structure diagram • Draw the following structure diagrams (with data flow) • A program that calculates the area of people’s gardens when given the length and breadth in metres • A program that works out the average test score for a pupil from 3 different test scores

  22. Software Development Process • Implementation – This is the process of turning the design into a suitable programming language. We will use a High Level Language, called Visual Basic. • Testing – A great deal of time is spent on testing. A wide range of conditions will be tested. Normal, extreme and exceptional testing.

  23. Documentation • User Guide: Details of how to use the program • Technical Guide: The minimum specifications required of the computer you wish to install the software on. Will also contain installation instructions

  24. Maintenance • The 7th and last stage of the development process • Continuous • 3 types of maintenance • Corrective • Perfective • Adaptive

  25. Maintenance • Corrective • Fix bugs that appear when program is in use • Company might make downloadable “patch” available • Perfective • Adding new features • Might mean a new a version of the software is created • Adaptive • When software needs to take account of some change in the conditions it operates in • E.g. new version of operating system for example was designed for Windows XP and adapted to run on Windows Vista

  26. Order these steps correctly • A – writing a user guide and technical guide for the software • B – Deciding the game you want to create, and what features you want it to have • C – adapting the game to run on a different type of computer • D – Actually writing the program code • E – Checking that the program does what it is supposed to do, is easy to use, and can be fixed if there is a problem • F – working out the details of what the screens will look like, what menus and functions there will be, and other detailed aspects of the program • G – Getting users to try out the program to make sure it works under most conditions

  27. Copy this diagram ANALYSIS – the user requirements are determined at this stage MAINTENANCE-upgrading DESIGN – Software and Program design are detailed at this stage SOFTWARE DEVELOPMENT LIFECYCLE EVALUATION - refinements DOCUMENTATION – technical and user guide drawn up. IMPLEMENTATION – actual program put into operation TESTING – errors and bugs corrected

  28. High Level Languages (HLLs) • Just like human language, there are many different types of programming language • Each has been designed to solve a specific type of problem • Each has it’s own strengths and weaknesses

  29. High Level Languages (HLLs) • Visual Basic is an example of a High Level Language • High Level Languages contain ‘normal’ words and are close to English • This makes them relatively easy for us to understand • However, as we know computers only understand binary

  30. Low Level Languages • Low level languages are closer to the language that the computer can understand • It is very difficult to track down and fix bugs using these languages

  31. Machine Code • Computers only understand binary, the only input a processor will accept is a binary code and it will only give this as output, these are known as Machine Codes • There are a number of problems with Machine Codes • They are different from processor to processor • Hard for humans to understand and use • Difficult to find and fix errors

  32. Questions • Which type of language (high or low) is easier to understand? • Which type would be easier to correct if it had a mistake in it? • Name 2 low level languages • Name 2 high level languages • Explain the main differences between high and low level languages • List 2 advantages of high level languages

  33. High Visual Basic Pascal Logo Java Low Machine Code Assembler High/Low Level Languages

  34. How does a computer understand a HLL? • The short answer is it doesn’t • What could we do if we wanted to communicate with a Chinese person who doesn’t speak English and we don’t speak Chinese? • Get a translator • This is exactly what a computer does • Every HLL has a translator to translate it to code the computer understands

  35. Translators • There are 2 different types of translator • Compiler and Interpreter • Each has strengths and weaknesses

  36. Interpreters • Take each line one at a time and convert to machine code • This is the reason that Visual Basic tells you when you’ve made a mistake at the end of each line • This means when a program is run the line has to first be translated and then executed, which slows the program down

  37. Interpreters • The program needs to be translated each time it is run so there is no way to speed the process up. • This means the interpreter and the program must be stored after the program is complete • Where the program goes the interpreter is needed

  38. Compiler • Translates the program when it has been completed • It takes the whole program and converts it to machine code at once • This machine code can be kept and run as many times as you want • Means the program runs faster • Only the compiled program needs to be stored

  39. Questions • Name the two main types of translator programs • Which one translates the whole program into machine code before it is executed? • Which translates the program line by line? • Why do machine code programs run more quickly on a computer than high level language programs?

  40. Text Editors • Implementation of a program takes place in a high level language(HLL) • High level languages are very close to English and therefore we can use tools much like those we would use when typing an essay e.g. cut and paste • HLLs can be typed in a word processing package and saved as a text file, ready for translation to machine code

  41. Scripting Language and Macros • This unit is mostly concerned with the process of developing stand alone applications in high level languages • However small programs can be developed within some existing application packages • These are called macros • Macros are time saving programs written in a scripting language which can be activated by a series of key strokes for repeated use. They will only work with an application program, they cannot exist alone. • They can extend the functionality of an application • They customise applications

  42. Questions • What is a macro? • What type of language is used to write macros? • What are the advantages of using macros? • Describe 2 examples where a macro could be useful.

  43. Variables(Implementation) • We declare variables in our program to hold values that might change throughout the execution of our program • We will be mainly using 3 variable types in this course. String (for text), Integer (whole numbers) and Single (numbers with fractions) • If we declare a variable as a certain type the program will expect this type to be used when trying to set a value for a variable

  44. Variables(Implementation) • It is good practice to declare all of the variables at the start of the program Dim name as String Dim age as Integer Dim rate_of_pay as Single Dim is short for Dimension A space in memory name age rate_of_pay

  45. Which variable type? • 0.456 • Jones • -56 • 291 • Mike • 17.886 • 3.14 • R2D2

  46. Which variable type? • 0.456 Single • Jones String • -56 Integer • 291 Integer • Mike String • 17.886 Single • 3.14 Single • R2D2 String

  47. Exercise • Which of the following excerpts of code will give errors?: (a) Dim name as String Name = “Derek” • Dim price as Single price = “Derek” • Dim price as Integer price = 30

  48. Formatting Output • It is good practice to format your output accordingly e.g. if you are outputting a monetary value it should look like this: £3.90 • There is a function in VB6 that takes care of this for you, cleverly it is called the Format function and can be used like this: Format(price, “currency”)this has the effect of formatting the variable price so that when it is output to the screen it will have a £ sign added automatically

  49. Formatting Output • Some other examples Format(price, “.0”) to one decimal place Format(price, “.000”) to 3 decimal places Format(average, “percent”) ?? Format(time, “.00\s”)??

  50. Naming Conventions • Label – start with lbl • TextBox – start with txt • Command Button – cmd • Picture box – pic • List Box - lst

More Related