8.2.1 Defining and understanding the problem, and planning and designing software solutions








In planning a solution, students need to understand the problem to be solved and how the solution will be used. In this topic, students will consider all aspects of the solution before starting its implementation. The selection of data types and structures used in the solution of a problem can have a huge impact on the effectiveness of that solution. A variety of data types and structures are introduced in this topic and appropriate algorithms should be developed and implemented that make best use of these. As algorithms become more complex, there is a need for a methodical top-down approach with progressive refinement of detail. It is important that algorithms use the control structures as specified in Course and Software Specifications document. Problems should be selected at a level of difficulty commensurate with the ability level of students.


Outcomes
A student:
P1.2 describes and uses appropriate data types
P1.3 describes the interactions between the elements of a computer system
P2.2 describes the effects of program language developments on current practices
P3.1 identifies the issues relating to the use of software solutions
P4.2 investigates a structured approach in the design and implementation of a software solution
P4.3 uses a variety of development approaches to generate software solutions and distinguishes between these approaches
P5.2 uses and develops documentation to communicate software solutions to others.
.

Students learn about:

Students learn to:

Understanding the problem

  • clarification of the specifications

  • performance requirements

  • identification of inputs and required outputs

  • determining the steps that, when carried out, will solve the problem

  • Input Process Output (IPO) diagrams



Abstraction/refinement

  • the top-down approach to solution development

  • a system comprises all the programs in the suite

  • a program comprises all of the modules required to perform the required task

  • a module is a group of subroutines that together achieve a subtask

  • a subroutine is a set of statements that performs a single logical task







Data types

  • data types used in solutions, including:

  • integer

  • string

  • floating point/real

  • boolean

  • integer representation in binary, decimal and hexadecimal

  • characters represented as numbers in binary, decimal and hexadecimal

  • limitations of particular data types

  • data structures, including:

  • one-dimensional array

  • record

  • use of records in sequential files



  • determine the inputs and outputs required for a particular problem

  • produce an IPO diagram from a set of specifications






  • develop a systematic approach to the development of software solutions

  • document a proposed non-complex software solution

  • represent the flow of data through a system using a context diagram

  • represent a system using a data flow diagram (DFD) to show its components and the data transferred between them

  • represent a system using a structure chart to show the interrelationship between the component modules

  • represent a system using a systems flowchart to show its component modules, files and media







  • interpret and use an ASCII table

  • identify the maximum decimal value that can be stored in a given number of bits

  • recognise the impact of the use of an inappropriate data type

  • select the most appropriate data type for the solution to a particular problem and discuss the merit of the chosen type

  • create a data dictionary which defines the data appropriately


Structured algorithms

  • control structures which form the basic building blocks of all algorithms:

  • sequence

  • selection (binary, multiway)

  • repetition (pre-test, post-test), including for … next loops

  • use of subroutines


  • methods for representing algorithms:

  • pseudocode

  • flowcharts incorporating standard control structures

  • software structure

  • use of a clear uncluttered mainline and subroutines

  • use of a modular approach

  • use of stubs to represent incomplete modules

  • use of standard algorithms, including:

load an array and print its contents

add the contents of an array of numbers

  • checking the algorithm for errors

  • benefits of using structured algorithms

  • ease of development

  • ease of understanding

  • ease of modification




  • identify control structures in an algorithm







  • interpret and create algorithms represented in both pseudocode and flowcharts that use standard control structures








  • detect logic errors in an algorithm by performing a desk check


  • gather solutions from a number of sources and modify them to form an appropriate solution to a specified problem


  • represent code from different sources as an algorithm to assist in understanding its purpose and to assess its relevance in a proposed solution


  • incorporate a stub for modules for which the detail has not yet been developed