Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Design (AQA) - Isaac Computer Science

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

Home Design (AQA)

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.

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 1/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

A Level A high-level overview of how different parts of the system interact

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.

IPSO charts are one of the most useful techniques for


prompting you to articulate what else needs to be designed.

Example

Example of two rows in an IPSO chart about the social networking system:

Input Process Storage Output

Student details: - Validate input Student table - Message stating


- Encrypt password (database) registration
- Name - Generate email successful
- Tutor - Encrypted
- Email password
- Username - Email with a
- Password verification link

Triggered by button on Sum of all Array of records Line chart


reporting screen registration over the (int)
last year, subtotalled
by month

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

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 2/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

Figure 1: Example of a hierarchy chart

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

Figure 2: Example of page navigation

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 3/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

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

Figure 3: Example of a system flowchart

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 4/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 5/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

A Level User interface

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:

Data item Data type Validation/Restrictions

Student name Text - Required


- Letters and spaces only

Tutor group Text - Required


- Select from drop-down list

Email address Text - Required


- Use regular expression to check
valid format
- Will also be validated by having
to click on the link in the email

Username Text - Required


- Must be unique (on system)

Password Text - Required


- Must be at least 8 characters
- Must contain at least one each
of the following: uppercase letter, lowercase
letter, number, and special
character.
- Verified by double entry

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.

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 6/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

Figure 4: Example of annotated GUI design

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.

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 7/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

Figure 5: Example of annotated design for a report

Figure 6: Example of annotated design for a graph

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 8/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

A Level Permanent data storage

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.

Type Suitable for Design


(examples)

Text files Simple flat files with no Record structure — fixed


requirement to directly length fields or CSV
access single records

Binary files - Structured data that only Record structure


needs to be retrieved and read
into your system (e.g. game
data)
- Image data

Files organised for Very large volumes of data Record structure


direct access where specific records need Access mechanism
to be retrieved directly

Database - Large volumes of data E-R diagram (normalised


- Data that needs to be table design)
searched frequently DDL statements

Database design Text files Binary files Files organised for direct access

Example design work: E-R diagram (relations normalised)

Figure 7: Example of annotated design for a graph

Example design work: DDL statement

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 9/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

CREATE TABLE Student(


StudentId CHAR(8),
Surname VARCHAR(40) NOT NULL,
FirstName VARCHAR (40) NOT NULL,
Dob DATE NOT NULL,
TutorId CHAR(4) NOT NULL,
FOREIGN KEY (Tutorid) REFERENCES Tutor (Tutorid),
PRIMARY KEY (StudentId));

Student ID Surname First name DOB Tutor ID

16 bytes 80 bytes 80 bytes 20 bytes 8 bytes

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).

Example design work: Text file

File structure: student.csv

Student ID Surname First name DOB Tutor ID

Each field will be variable-length and separated by a comma.

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.

Example design work: Binary file

File structure: gamedata.xyz

The game data will be stored in a list that comprises:

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.

Example design work: file organised for direct access

File structure: student.bin encoding scheme UCS-2

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.

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 10/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 11/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

A Level Internal data storage

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.

Class diagrams Example

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.

Figure 8: Example design work: UML diagram

Design work: array


The seating in the hall is configured with 20 rows of 100 seats. This will be stored as a two-dimensional array. A position (seat) in the hall
will be referenced by its row letter (A to T) and seat number (1 to 100). The element in the array will contain the booking reference (so that
the booking details can be retrieved from the database when needed).

When the user specifies a seat, e.g. G33, we can get the relevant indices as follows:

row = CHAR_To_NUM (letter) - 64

seat = number - 1

To access the booking reference for a particular position (seat) in the hall, we can specify:

booking_ref = hall [row] [seat]

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 12/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 13/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

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:

Encrypt the password


Select the number of users that have registered in the last 12 months, subtotalled by month
Select users with matching interests
Calculate the degree of match between users

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.

Pseudocode Structured English Flowchart SQL

Purpose: To calculate a grade

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

Purpose: To validate an email address

Regular expression is (^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)


If email is blank then
Report error "Email address must not be left blank"
Else if email does not match regular expression then
Report error "Email is not in a valid format"
Else email is valid

Purpose: To validate a username

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 14/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

Figure 9: Example of algorithm as a flowchart

Purpose: To get details of the last 12 months' registrations grouped by month

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)

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 15/16


2/5/24, 10:21 AM Design (AQA) — Isaac Computer Science

All teaching materials on this site are available under the Open Government Licence v3.0, except where otherwise stated.

https://isaaccomputerscience.org/concepts/prog_cw k_design_aqa?examBoard=all&stage=all 16/16

You might also like