Professional Documents
Culture Documents
1
Workshop 1
Analysis of the problem
Task
Use the marking instructions on page 5 of the Advanced Higher project assessment task
document available at https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf to
mark the analysis evidence for candidates 1 and 2.
You can record your marks on the grid that follows each candidate’s evidence in this booklet.
The total mark that was awarded for analysis is provided in the grid.
2
Candidate 1 evidence
Analysis of the Problem
Description of Problem
I intend to develop a quiz based on well-known historical events. The quiz will have
three levels of difficulty so that the user can select a level on either their historical
knowledge or how much of a challenge they want to set themselves. I intend to
include the following features: login facilities, help screens, each level of difficulty will
have a quiz selected at random, each quiz will have multiple choice questions and a
leader board that can be sorted.
The end-users of my quiz will specifically be S1-S6 students who study history at school
but also anybody who is interested in history and wants to test their knowledge.
My project meets the advanced higher computing requirements because it will have a
user interface suitable for S1-S6 students which will be easy to use and will validate all
inputs. My project will interface with stored data within a database for the questions
(using SQL) and also with a text file to store the login facilities (these will be processed
using an array of records). My project will also use a sort algorithm to arrange the details
leader board details.
Scope
Constraints
There are a number of technical, economic and time constraints that will apply to this
development.
3
1. I will use LiveCode version 9 to create the quiz because I have several years’
experience using this language
2. The final solution will run on the Windows systems with ODBC to access my quiz
database.
3. Microsoft Access will be used to store my quiz questions
4. There will be no costs involved in the development of my project because I am
using software that is fully licensed and readily available in school
5. I will ensure that my project is completed by the deadline of 29th March as it will
need to be delivered to SQA for marking. The submission deadline is 4th April
2019.
Boundaries
4
UML Use Case Diagram
Requirements Specification
For my system to be able to fulfil its requirements, it must meet several criteria:
1. The Login page is the first screen that users will see, and will allow the user to
enter
a) A valid username and
b) A valid password
2. The user will then press the “Login” button, which will check that the username
and password they have entered is valid by:
a) Checking that neither field is blank
b) Checking that the password entered contains more than 4 characters
c) Importing stored usernames and passwords from the login file
d) Checking that the username and password combination exists in the login file
3. If the user passes this validation:
5
a) The username will be stored in a variable to be accessed throughout the
program
b) The user will be directed to the Home page to select one of three levels of
difficulty options for the quiz
Users of my system will be able to log out of my system from the Home page. The logout
functionality will include:
1. Clearing the variable that stores the username of the currently logged in user
2. The user is brought back to the Login page
3. A message will be displayed telling the user that they have logged out
Home screen o User button click to:
inputs - indicate which of the three levels the user wants to
play
- logout of the quiz system
Home screen o Message displayed when the user logs out
outputs
The users will begin the quiz by choosing a difficulty from the Home page from the
choice of “Easy”, “Medium” or “Hard”, which will then take the user to the relevant Quiz
page for that level of difficulty. They will then press the “Play” button to start the quiz.
The quiz will provide the following functionality:
1. The username of the currently logged in user will be displayed at the top corner
of the page
2. When clicked, the “Home” button will allow the user to return to the Home page
3. A “Clear” button will be provided to clear the output box between successive
attempts
6
4. Once the “Play” button is pressed:
a) A list of 10 questions will be randomly selected
b) Each question will be displayed one at a time in an output field on the Quiz
page
c) The list of 4 possible answers for each question will be displayed below the
question in the same output field
d) A pop-up box will be used to allow the user to enter the number of their
chosen answer
e) The number entered will then be compared with the correct answer stored in
the database
f) If the answer is correct, a message stating that they’re correct will be
displayed and one will be added to their score
g) If they’re incorrect, then the score will remain the same and a message
stating that they’re incorrect will be displayed
h) Once the quiz is finished, the score that the user achieved out of 10 will be
displayed
i) The username and score of the user will be added to the leader board file for
the chosen level of difficulty
Quiz screen inputs o User button click will be used to:
- start the quiz
- return to the Home screen
- clear the leader board display area
o Users will type their answer to each question into the pop-
up box that opens
Quiz screen o Username of the current user will be displayed
outputs o Each question will be displayed along with the 4 possible
answers
o Correct or incorrect message will be displayed
o The user’s quiz score will be displayed
The users will be able to view a leader board for each difficulty of the quiz “Easy”,
“Medium” and “Hard”. The leader board functionality will include:
1. The username of the currently logged in user will be displayed in the top corner
2. A “Return” button will be provided to return to the Home page
3. A “Clear” button will be provided to clear the leader board display area
between displays
4. When the “Display” button is pressed:
7
a) The contents of the file storing the scores for the user’s chosen difficulty will be
imported into the program and sorted in descending order
b) The top 10 scores will be displayed with the username of those who got them
Project Plan
Here is my detailed project plan with list of tasks and time allocation.
6 days
8
Interface design - 5 days 1st Nov 8th Nov
Create wireframes
Diagrams
8 days
2 days
9
Finalise analysis 1 day 15th Feb 15th Feb
implementation
Resources Required
The resources I will need at each stage of the development are listed below.
10
Marking grid
Requirements specification 4
Project plan 2
Total 10 8
Once you have recorded the marks you think the candidate should be awarded, visit the
Understanding Standards website:
https://www.understandingstandards.org.uk/Subjects/ComputingScience/advanced to see how
these compare to the actual marks awarded. You will also find a commentary explaining why
these marks were awarded.
11
Candidate 2 evidence
Analysis of the Problem
End users of the proposed site will be predominantly females ages 15 – 40 who have a keen
interest in make-up. In the website, users will be able to view makeup products from
selected brands and search for specific products.
It will have an appropriate interface with all user inputs being validated
Details of customers and products will be stored in a SQL database
It will make use of HTML form processing using PHP
SQL operations will be used to insert details and perform searches
Web pages in the site will be styled using external CSS
When customer login to the site, PHP session variables will be used to store their data
across multiple pages of the site
The website will adapt to different screen sizes using CSS media queries
Scope
Requirements specification
Detailed design
Fully working implementation
Comprehensive test plan with a summary of the final testing
Boundaries
Due to the limited time available to develop this website, several restrictions are needed.
The registration process will be used to create new customer accounts and input
validation will be applied to all details entered to the website.
12
The website will be made responsive to a different screen size by altering the size
of the browser window. It doesn’t need to be tested on different devices.
Customers will navigate the site using a horizontal navigation bar.
Constraints
13
Requirements Specification
Purpose of the site: The purpose of the website is for users to be able to view cosmetics
from selected brands when they register and log into the site.
Functional Requirements
The website will be able to store the details of customers and products in an
external database
The website will be able to validate all user inputs to the website
It will be easy to navigate with a fully functioning navigation bar
Check that users are registered when they login to the website
Pages of the website will be formatted using an external style sheet
Users will be able to search for products by brand or by product name by
connecting to the database and executing SQL queries
Display formatted search results (details of each product found, including an image
of these products)
Session variables will be used to store a customer’s login details across pages of the
website
Responsive layout that changes depending on the screen size being used
End-User Requirements
Through the analysis of my user surveys, I have come up with a list of requirements that
were the most common answers amongst the people answering my surveys:
First Name
Last name
14
Home address
Telephone Number
Username
Password
Search criteria
Project Plan
Resources Required
During the development, I will need access to a computer with the following software
resources:
15
Text editor
Browser
Web server tools
16
Detailed Project Plan
17
For clarity, I have repeated the tasks to be completed at each stage of the project’s
development.
Tasks Est Duration (hours) Target Date
Analysis
Read requirements for AH project and create idea
Write outline of project
Scope, boundaries and constraints
UML Use Case diagram 6 6th October 2018
Requirements specification – end-users
Requirements specifications – functionality
Description of inputs and output
Project planning
Design
Interface design – wireframes
Structure diagram – website 6 2nd November 2018
Pseudocode (server-side tasks)
Database design
Implementation
Database structure
HTML pages
Navigation bar (CSS)
PHP (registration page)
PHP (login process)
24 15th February 2019
Session variables
PHP (search process)
Media query
Validation (registration process)
Ongoing testing
Description of research/new skills acquired
Testing
Test plan (requirements)
Persona and test cases 10 8th March 2019
Final testing
Test evidence
Evaluation
Fitness for purpose
2 15th March 2019
Maintainability
Robustness
18
Marking grid
Requirements specification 4
Project plan 2
Total 10 8
Once you have recorded the marks you think the candidate should be awarded, visit the
Understanding Standards website:
https://www.understandingstandards.org.uk/Subjects/ComputingScience/advanced to see how
these compare to the actual marks awarded. You will also find a commentary explaining why
these marks were awarded.
19
Workshop 2
Design of the solution
Task
Use the marking instructions on page 6 of the Advanced Higher project assessment task
document available at https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf to
mark the design evidence for Candidate 2. You will need to refer back to the requirements
specification in the analysis section.
You can record your marks in the grid that follows the candidate evidence in this booklet. The
total mark that was awarded for design is provided in the grid.
20
Candidate 2 evidence
Design of the Solution
The website should display correctly when viewed in the browser on the school’s desktop
PCs. The display should be altered when the web browser window is reduced to a width of
750 pixels. When this happens, the font sizes will be reduced, and the horizontal
navigation bar will be altered.
21
User Interface Design
22
23
24
25
Session Variable
A session variable will be used to store the username entered during a successful login.
The user name submitted from the HTML form will be assigned to the PHP variable
$username using $_POST
The value stored in $username will be assigned to the session variable “sessionuser”
using $_SESSION
26
28. Create query to add customer details to database
29. Execute query to add details to the customer table
30. End if
31. Close server connection
Login Process
1. Start session
2. Assign connection details to PHP variables
3. Connect to database server
4. If there is an error with the connection then
5. Display error message
6. End if
7. Assign values submitted by HTML login form to PHP variables using $_POST
8. Assign value stored in $username to session variable sessionUser
9. Create SQL query to fetch details of customer from database (match by username)
10. Execute SQL query
11. If no records returned from the query then
12. Display account details not found message
13. Else
14. While a record is available for processing
15. If password entered = password in returned record then
16. Display personalised welcome message
17. Redirect to search page
18. Else
19. Display incorrect password message
20. redirect to login page
21. End if
22. End while
23. End if
24. Close database connection
Search Process
1. Start session
2. Assign connection details to PHP variables
27
3. If there is an error with the connection then
4. Display error message
5. End if
6. Assign search criteria submitted by HTML search form to PHP variable using
$_GET
7. Create query to fetch product details matching search criteria from database
8. If no products are found then
9. Display error message stating that no products are available from that brand
10. Else
11. Display table headings
12. While a product record is available for processing
13. Display product details in table cells
14. End while
15. End if
16. Close database connection
Query Design
Registration Query
firstname, surname, username, phonenumber, email, address,
INSERT password
(all fields in the registration page)
TABLE customer
firstname, surname, username, email, address, password
VALUES
(all fields in the registration page)
Login Query
SELECT everything from the customer table (use * wildcard)
FROM The customer table
WHERE username = username entered
Search Query
SELECT everything from the product table
FROM The product table
WHERE brand = brand entered
28
Data Dictionary
Customer Table
Field Name Field Length/Type Required Key
firstName Varchar(15) Yes
surname Varchar(25) Yes
username Varchar(20) Yes Primary key
telephoneNumber Int(11) Yes
emailAddress Varchar(50) Yes
Products Table
Field Name Field Length/Type Required Key
productID Int Yes Primary key (auto
increment)
productName Varchar(50) Yes
type Varchar(20) Yes
brand Varchar(50) Yes Restricted choice
price Float(4,2) Yes
imageFilename Varchar(20) No
29
Hierarchical Design of Website Structure
Links between pages has been indicated by the arrows in the hierarchical diagram below.
Marking grid
Design of integration 4
Total 20 13
Once you have recorded the marks you think the candidate should be awarded, visit the
Understanding Standards website:
https://www.understandingstandards.org.uk/Subjects/ComputingScience/advanced to see how
these compare to the actual marks awarded. You will also find a commentary explaining why
these marks were awarded.
30
Workshop 3
Implementation
Task — Part 1
The code for Candidate 1’s project follows. With reference to pages 7 and 8 of the Advanced
Higher project assessment task document available at
https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf, annotate Candidate 1’s
code to highlight the important sections of code for marking:
It is good practice to encourage candidates to highlight these sections of code when submitting
final project evidence for marking.
31
Candidate 1 evidence
Implementation code
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Task — Part 2
As this solution is being developed, ongoing testing will take place. Most of the ongoing testing
will involve component testing, but integrative testing will also be carried out.
Use the grid below to give examples of component and integrative testing that will be needed for
Candidate 1’s project. A completed example can be found in Appendix 1.
Component testing
Test Component to be tested Description of test(s)
(1) Check that username and password cannot be null
login leave username empty
login with password empty
login with both username and
password provided
1 Login validation
(2) Check that password entered has at least 5 characters
login with password which has only
3 characters
login with password that has 5
characters
47
Integrative testing
Test Components being integrated Description of test
Quiz screen user interface (SDD) Use program code to connect to database and
5 + display temporary message to indicate either
Connection with database (DBDD) “Connection successful” or “Not connected”
NOTE: In their log of ongoing testing, candidates should not only describe tests that were
needed. They are also expected to:
Having described each test that is needed, candidates must log details of issues encountered.
This evidence could be presented as a simple table with a list of any references. For example:
References used
http://lessons.livecode.com/m/4071/l/49652-how-to-connect-to-a-database-using-odbc
48
Task – Part 3
As candidates implement their solution, they are expected to implement some code that goes
beyond the requirements of the Advanced Higher course.
The research and development of new skills for Candidate 2’s project follows. Use page 8 of the
Advanced Higher Project Assessment task document available at
https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf mark the evidence for
Candidate 2.
49
Candidate 2 evidence
Implementation
To create my final solution, I had to research skills that weren’t taught as part of the AH
course.
2) Server-side Validation
Although I had used client-side validation at Higher level to validate all inputs to online
forms using HTML, I wanted to use server-side validation in my project to validate all
details input to the registration process. I did some research online and found a lot of
useful information. Although I could have included a lot more complex validation, I decided
to only make use of the PHP empty() function. The reference that I found most useful was
the one on the W3School website.
References Used
1) http://coredogs.com/lesson/sample-dogtoys.html
2) https://www.w3schools.com/php/php_form_required.asp
Once you have recorded the marks you think the candidate should be awarded, visit the
Understanding Standards website
https://www.understandingstandards.org.uk/Subjects/ComputingScience/advanced to see how
these compare to the actual marks awarded. You will also find a commentary explaining why
these marks were awarded.
50
Workshop 4
Testing the solution
Task 4
The test plan for final testing should be comprehensive to ensure that the solution meets all the
requirements identified at the analysis stage. It should include:
all requirements
a description of the tests to be carried out
a persona and test cases to test the solution with an end user
Use the grid on the next page to describe a suitable persona and test cases that could be used
during final testing of Candidate 1’s project. A completed example can be found in Appendix 2.
51
Testing the solution
52
Workshop 5
Evaluation of the solution
Task 5
Use the marking instructions on page 10 of the Advanced Higher project assessment task
document available at https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf to
mark the evaluation evidence for Candidate 2. You will need to refer back to the requirements
specification in the analysis section.
You can record your marks in the grid that follows the evidence. The total mark that was
awarded for evaluation is provided in the grid.
53
Candidate 2 — Evaluation of the solution
The results of testing show that the completed project now meets all of the original
requirements, functional as well as end-user requirements. Users can register with the
site, login using their registration details and search for cosmetic products. All inputs to
the site have been validated as per the requirements of an AH project. Testing with the
persona and test cases showed that participants were able to successfully complete all
tasks given to them. I carried out all of the tests listed in my test plan and produced
evidence for each of the test cases in the plan. I am confident that my solution meets all
of the requirements listed in the requirements specification.
Maintainability
I believe that my solution is maintainable. I have used meaningful variable names for each
HTML input element and also for the PHP variables and the database fields. I have added
comment lines on each of my HTML pages to explain the purpose of each input element.
54
Here is a screen-shot showing some of the commentary used in the product.html script.
On my PHP pages, I have used lots of white space to split the code into several sections
that each perform one server-side side. An internal comment at the start of each section
makes it easy for other developers to read the code and understand what each section of
code is doing. I have also used internal comments to explain the purpose of each PHP
variable. This is a screen-shot from the products.php script used to process the search
feature of the website.
It would have been possible to make use of functions to perform some of the processing
on each page. For example, I could have used a function to validate the form input on the
registration form but instead, I simply added the validation code to the body of the page.
Because of this, my solution is not modular.
I used external CSS to style each page of the website. This means that if any corrective,
adaptive or perfective maintenance is required in the future, it will be easier and much
less repetitive for developers to edit or change the formatting details because they are
held in a single file.
55
Robustness
The registration page of my website is robust as every single input is validated using
server-side code. When creating a new account, the user must provide each one of the
required details otherwise an error message will appear telling the user that the detail is
required. The code used to do this validation is part of the registration.php script. Here is
a small section of that code.
When I was work on the implementation, I realised that it was taking me longer that I
expected to create working code. In the end, I decided to focus on building a working
website. Although I managed to get the login and search features of my website to work
correctly, I didn’t have time to add similar validation code to the login.php and product.php
scripts.
Marking grid
Total 5 4
Once you have recorded the marks you think the candidate should be awarded, visit the
Understanding Standards website
https://www.understandingstandards.org.uk/Subjects/ComputingScience/advanced to see how
these compare to the actual marks awarded. You will also find a commentary explaining why
these marks were awarded.
56
Workshop 6
Ensuring projects meet the Advanced Higher criteria
Task
Referring to pages 14–19 of the Advanced Higher project assessment task document available
at https://www.sqa.org.uk/sqa/files_ccc/AHCATComputingScience.pdf, consider the project
outlines which follow. These outlines do not fulfil the Advanced Higher project requirements.
Examples of the details that could be added to the three project outlines below can be found in
Appendix 3.
57
Project 1 outline
This project will develop a database for a driving school. Each of the driving school instructors
has sole use one of the driving school cars and each hourly lesson booked is with one instructor
at a given time. Clients will be able to book individual lessons or blocks of lesson.
As it stands, this outline does not satisfy the AH project requirements. Use the grid below to:
1. add details to this outline to ensure that it does meet the AH project requirements.
2. circle the main area of the course and two AH constructs that would be covered by the
complete project outline
3. circle the area of integration covered by the complete project outline
4. identify the AH constructs and integration content required
Additional details
AH construct 1
AH construct 2
Integrated content
58
Project 2 outline
This project will develop a game of ‘Concentration’. The aim of the game is to match pairs of
initially hidden images. To complete the game successfully, the player must match each pair of
images. Players click on a cell to see what it is and then click on one of the other cells to try and
match it. If the images match, they will remain visible; if not, they will flip back over.
As it stands, this outline does not satisfy the AH project requirements. Use the grid below to:
1. add details to this outline to ensure that it does meet the AH project requirements.
2. circle the main area of the course and two AH constructs that would be covered by the
complete project outline
3. circle the area of integration covered by the complete project outline
4. identify the AH constructs and integration content required
Additional details
AH construct 1
AH construct 2
Integrated content
59
Project 3 outline
This project will develop a website that can be used by teachers to post details of homework
and assignments. Parents and students will be able to search the site to display details of
relevant homework tasks.
As it stands, this outline does not satisfy the AH project requirements. Use the grid below to:
1. add details to this outline to ensure that it does meet the AH project requirements.
2. circle the main area of the course and two AH constructs that would be covered by the
complete project outline
3. circle the area of integration covered by the complete project outline
4. identify the AH constructs and integration content required
Additional details
AH construct 1
AH construct 2
Integrated content
60
Appendix 1
Component testing — completed example
Many different examples of component and integrative testing are possible. A few examples of
these have been provided below.
61
Appendix 2
Testing the solution — completed example
Persona and test cases to be used for final testing
He has been doing some personal revision for his prelims. For most of this
revision, Karmal has been revising questions to practise his written answers. He
would like to use the quiz to test his knowledge and recall of historical facts.
1 You can choose any username but the password you use must
have at least 5 characters. Make a note of the username and
password because you will need them later.
Use the login facility to login using your own username and
password.
2
Answer the first three questions of the hard quiz then return to the
home page.
Play the easy quiz by answering all of the questions then view the
3
easy level leader board.
Clear the leader board display area then return to the home page
4
and log out of the quiz.
62
Appendix 3
Project 1 outline
Examples of details that could be added to the project outline have been provided below. These
additional details fulfil the criteria of a DDD focused project and provide the integrated content
that is a requirement of all Advanced Higher projects.
Although it would be possible to integrate the DDD content with WDD, the suggestions here
refer to integration with SDD content.
63
Project 2 outline
Examples of details that could be added to the project outline have been provided below.
These additional details fulfil the criteria of a SDD focused project and provide the integrated
content that is a requirement of all AH projects. The suggestions refer to integration with DDD
content.
Note that it would be possible to implement a solution where the main focus was WDD as an
alternative to the SDD solution suggested here.
64
Project 3 Outline
Examples of details that could be added to the project outline have been provided below.
These additional details fulfil the criteria of a WDD focused project and provide the integrated
content that is a requirement of all AH projects. These suggestions refer to integration with DDD
content.
65