Design (AQA) - Isaac Computer Science
Design (AQA) - Isaac Computer Science
Design (AQA) - Isaac Computer Science
Design (AQA)
The design stage is vital to the success of the project. You don’t have to design everything in detail at the outset, but if you start developing without
considering the design beforehand, you are likely to waste a lot of time.
This high-level overview will depend on the type of system that you are developing and it is up to you to pick the most appropriate method(s).
These are some commonly used techniques:
IPSO chart IPSO charts are really useful for identifying the classic
transformation of data into information. For each output,
you should think about what data is required, how it is processed,
and any associated storage.
Example
Example of two rows in an IPSO chart about the social networking system:
Hierarchy chart Hierarchy charts can show how a large program will be split
into subroutines. Hierarchy charts can also show the
interface (parameters and return values) between
subroutines.
Example
Page navigation Page navigation shows how the different pages/forms that make up your
system are linked and how each page/form can be reached.
Example
System flowchart System flowcharts are very useful for games and control systems (e.g. for
a robot) to show the overall flow of play/control. The system
flowchart is a graphical representation of the major
stages within the system. It is an abstraction in that it often
will not include minor parts of the system.
Example
Most systems have a graphical user interface. GUIs can be time-consuming to produce, so a clear design is essential. Whatever type of
interface you envisage, start by thinking carefully about what data needs to be captured. It is useful to make a list of everything that needs to be
input and how you can minimise data input errors.
Here is an example of the data required for initial user registration in the social network system:
Note: All of the data types in this table are described (correctly) as text. You will usually have a wide range of data types, e.g. date, integer,
decimal, Boolean, etc. You can use generic data types or, at this stage, use types specific to the programming language/database system that
you plan to use.
Interface design
Once you have identified all of the data that needs to be captured, you can design your interface. AQA do allow you to include screen captures of
your actual interface as evidence, but clear hand-drawn sketches are fine too. To avoid wasting time and effort, you should design your interfaces
before you start to make them. Annotate the design clearly to draw attention to design aspects as shown in the example below.
Next, you should consider the system outputs. Look back at the system requirements and identify the information that the system has to
produce. How will this information be presented? In many instances, it will be displayed on a screen, but outputs can be in many other forms.
Some outputs, such as an email, have a fairly standard layout. Reports from databases are often in table form. Graphs can take many forms.
Hardware projects may have physical outputs, such as lights or movement.
Most systems store data permanently (or at least until someone decides to delete it). If the data stored includes personal data, it is important that
the system has the functionality to delete data so that it complies with GDPR.
You have several choices for data stores. You may wish to choose a storage method that contributes to the complexity of the project, but make
sure that it is appropriate for the storage task.
Database design Text files Binary files Files organised for direct access
A text file can have fixed- or variable-length records. Variable-length records are more space-efficient and you only need to decide on the
order of fields and how each field will be delimited. A common system is CSV (comma-separated variable); this system is also useful if
the data needs to be transferred to other systems, such as a word-processing system for mail merge or a spreadsheet for graphing. You
could also store your data as a JSON or XML file. It makes sense to use industry standard formats if your data is to be shared with other
systems (or if your data originates from another system).
Binary files are the most efficient way of storing data that only needs to be written and read by your own programs. It will save you having
to format and reformat data to fit a specific file structure. Again, you will need to research how your chosen programming language
handles files. In Python, the pickle module will allow you to take standard data structures and store them directly into a binary file.
There are 'standard' binary file formats, such as JPEG for image files. If you choose a standard format, you will need to research the way
in which data is laid out, and you will probably be able to find library code to read and write these files in the correct format. If you are
creating your own (proprietary) format, avoid using a standard file extension because it might be associated with a particular software
package. For example, if you use the file extension XLS, your operating system would almost certainly associate it with Microsoft Excel.
Player_1_hand
Player_2_hand
Card_deck
Player_1_score
Player_2_score
The design for each of these structures can be found in the internal data storage section.
When you plan the design of a file organised for direct access, you need to research how the programming language will access the file
directly. For example, in Python, the 'file seek' method allows you to start reading or writing at a particular point. This point would be
calculated by specifying position = record_size * record_number.
Your first design choice will be how the records will be laid out. For direct access, your records need to be fixed-size, so you will need to
specify a fixed-length character encoding scheme for your characters, e.g. UCS-2 which uses 16 bits (2 bytes) to encode each character.
Your second design choice will relate to how you will find the record number to directly access a specific record. You will probably use a
hash table, so you will need to design a hashing algorithm and an algorithm for dealing with collisions.
You will also store data for processing while your program is running. Some systems will only have runtime data (for example, in a game where
there is no feature to save and resume playing later). Most systems will use at least one type of data structure. This may be a simple one- or two-
dimensional array, or it could be an abstract data type such as a queue, stack, or hash table. Simple one- or two-dimensional arrays will not
attract marks for complexity. Look at the Data Structures theory topic and identify opportunities to use more complex structures (making sure that
they are appropriate for the task).
You will need to produce an implementation design for each structure that you plan to use. For example, a queue could be implemented as an
array of records, or a tree as three one-dimensional arrays.
OOP systems will need class diagrams. This will involve identifying the attributes and methods for each class. You will also need to
consider whether properties should be private, public, or protected. The relationship between the classes (inheritance, aggregation,
composition) can be shown on a well-developed UML diagram.
When the user specifies a seat, e.g. G33, we can get the relevant indices as follows:
seat = number - 1
To access the booking reference for a particular position (seat) in the hall, we can specify:
A Level Algorithms
Your algorithms are another key area on which the complexity of your system will be judged. The person marking your project will be looking for
evidence that you have designed, implemented, and tested complex algorithms, such as a graph traversal and/or complex SQL statements that
join tables and use parameters (user-supplied values) in the statement selection criteria. Not every algorithm will be complex and you must take
care not to contrive overly complex solutions — make sure your design ideas are proportionate to the size of the problem. For example, avoid
specifying a merge sort if you just need to sort a list of 10 items.
In this section of design, you need to specify the algorithm for each key process. A key process can be defined as one that will allow you to fulfil
your objectives. For example:
If you have an OOP system, you will devise an algorithm for each substantial method.
Algorithms can be expressed in pseudocode, in structured English, or as flowcharts. You can write SQL statements if you will be working with a
database.
FOREACH student
IF score >= 90 THEN
grade = “A”
ELSE IF score >= 80 AND score < 90 THEN
grade = “A”
ELSE IF score >= 70 AND score < 80 THEN
grade = “B”
ELSE IF score >= 60 AND score < 70 THEN
grade = “C”
ELSE IF score >= 50 AND score < 60 THEN
grade = “D”
ELSE IF score >= 40 AND score < 50 THEN
grade = “E”
ELSE
grade = “U”
END IF
END FOR
SELECT count(*)
FROM student
WHERE
regdate > = DATE_SUB(DATE_FORMAT(CURRENT_DATE,'%Y-%m-01'),INTERVAL 1 YEAR)
AND verified = True
GROUP BY Month(regdate)
All teaching materials on this site are available under the Open Government Licence v3.0, except where otherwise stated.