Chapter 7: Designing solutions to problems OCR Computing for A Level © Hodder Education 2009
What this chapter is about In this chapter we discuss: the types of error which may occur different strategies for testing programs tools used to identify errors within programs preparing the program so it can be executed on the end user’s computer. OCR Computing for A Level © Hodder Education 2009
The importance of good design A good design is one which is user-friendly, not necessarily one which looks good. A user-friendly design should be: –Effective: data can be input/output accurately, reducing the likelihood of errors. –Efficient: make the best use of facilities available, increasing productivity for the user. –Satisfying: the end user is comfortable and enjoys using it, reducing the training needed. OCR Computing for A Level © Hodder Education 2009
Designing input screens Factors to consider include: –The user, for example age or disabilities –Hardware available (e.g. Input devices) –Software options available (e.g. Graphical user interface) –Layout and order of items on the screen –How the data input will be validated – Instructions, help and information. If a data capture form needs to be designed to go with the input screen then it should be taken into consideration when designing the screen. OCR Computing for A Level © Hodder Education 2009
Modular Design In a modular, top-down design the problem to be solved is defined in simple terms and then split into subtasks. Each subtask is further split into smaller subtasks until each task can easily be solved. (This is called stepwise refinement.) The top-down design can be shown in a structure diagram. Advantages of using a top-down design include: –program is easy to write and test –fewer errors caused by different parts of the program interfering with each other –the programming can be split between a team of programmers, according to their expertise –code can be reused to perform the same task if needed. OCR Computing for A Level © Hodder Education 2009
Designing Algorithms An algorithm is a description of the actual instructions a computer needs to carry out to perform a task. Algorithms can be designed using: –Program Flowcharts: using conventional symbols to show the steps of the algorithm graphically. –Pseudo-code: text which is laid out like program code but focuses on describing the steps rather than writing the correct code. OCR Computing for A Level © Hodder Education 2009
Rapid Application Development (RAD) In RAD, prototypes of the software to be produced are used as part of the design process. The prototypes are evaluated with the end user, and the result of this is used to create the next prototype. This cycle is repeated until the final software is produced. Advantages: –User involved in design process and can influence its direction. –A tangible version of software is available early rather than an abstract design. –Overall development time is usually shorter. Disadvantages: –Not suitable for very large scale projects as numerous cycles will be needed, often revisiting previous prototypes. –Software produced often inefficient due to over- emphasis on the end result. OCR Computing for A Level © Hodder Education 2009