Category: Software Design & Devlopment

N45 – Scratch

Today we covered

  • Sequence
    • The order that the command are executed in the program
  • Stage
    • The part of scratch where all sprites are displayed (Screen)
  • Sprite
    • This is an object  in scratch which contains instructions (Script)
  • Script
    • An ordered list of command blocks which controls the actions of the sprite.

The class used Scratch to create a program animating a knock knock joke, please look inside the program for further help. The class made use of the Cornell Notes system to record the lesson. For homework the class have to write down the sequence of instructions used (program)

Higher – User Interface (Revision)

  • Usability: how useable software is in relation to its intended purpose; usability testing involves a target group of users who are often asked to perform a series of tasks under controlled conditions
  • Accessibility: how easy it is for users with disabilities to make full use of software that has been developed; examples include voice recognition and text to speech software; read out alt attribute on image tags on websites

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to edit and publish this here.

National 5 – User Interface (Revision)

User requirements

visual layout –  eye-catching, simple to use and clear of cluttered buttons and text.

navigation hierarchical, with links organised into sub categories, or linear, where pages are visited in one step-by-step order.

selection – options include clicking on a menu or radio buttons or filling in a form.

consistency – using the same font, colours styles & menus

interactivity – using video/audio, allowing users to post comments etc

readability – use white space and short pages to ensure it is easy to read.

Accessibility – Reading text aloud, alt attributes on image tags or having large fonts for users with eyesight issues.

Higher – Contemporary Developments (Revision)

Exemplification of trends in the development of:

  • Software Development Languages: use of pre-processors (allow a programmer to implement code in a language that will be translated into another before becoming machine code); use of frameworks (provides a pre-generated set of code programmers can use for design); app development (web apps used to handle different operating systems, software development kits used to create one app that can be changed for different operating systems); HTML5 (latest version of HTML)
  • Software Development Environments: use of text editors, graphical user interface creation, de-bugging tools, collaboration tools and the cloud, emulators and mini development environments via browser software
  • Intelligent Systems: designed to demonstrate aspects of human intelligence by using a computer system to replicate human decision making and interaction; key features include ability to learn, ability to make decisions without human input, presence of several aspects of human intelligence
  • Online Systems: a system that is interactive (server and client communicate and update data) and fully functional in real time when accessed via the Internet; A ticket ordering web based system or an online shopping site are examples of common online systems

Higher – Development Methodologies (Revision)

  • Rapid Application Development: means that the users should be involved at all stages of the development process and that changes to the design can be made at any time throughout the life of the project; it also means that the development process is faster and more flexible; emphasis is on creating software quickly and efficiently
  • Top-Down/Step-wise refinement: breaking down a problem into smaller more manageable steps

1 Setup Variables

2 Initialise Values
3 Do Calculation

1.1 Create number1 as a global variable
1.2 Create number2 as a global variable

2.1 Set number1 to 0
2.2 Set number2 to 0
2.3 Set total to 0

3.1 Receive number1 from keyboard
3.2 Receive number2 from keyboard
3.3 Set total to number1 + number2

  • Agile Methodologies: a product of RAD; emphasis on small scale developments, and with teams of people who have a flexible approach to change in requirements; it is important to keep the client involved in the process; there should be daily meetings between the clients and the developers, and necessary changes made to the requirements even late in development

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to edit and publish this here.

Higher – Design Notations (Revision)

Make sure you read the N5 post on design notations for examples of Structure Diagrams, Flow Charts and Pseudocode.

Wire-Framing: A wireframe can show how a website will look and how its navigations structure works; can be as simple as a rough sketch or can be a detailed design showing colour combinations and images

Entity Relationship Diagrams

Relationships can be represented graphically using an Entity-Relationship (ER) diagram.

There are many different notations for ER diagrams, we will use crow’s foot notation.
• The names of entities are written in boxes joined by straight lines.
• At the “many” end the line forks.
• At the “one” end the line it judt joins the box.

ERD

Data dictionaries

A data dictionary is a design notation used to show the fields required in each table of a relational database, including field types, validation required, etc.

dd

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to edit and publish this here.

National 5 – Design Notations (Revision)

N4

  • graphical to illustrate selection and iteration
  • other contemporary design notations

N5

  • pseudocode to exemplify programming constructs other contemporary design notations

 

Flow Chart
Flow Chart

You read a flow chart from the START block and follow the arrows (normally downward). In the example above you can see selection taking place in the first diamond, while the second diamond allows for iteration (repetition) to take place.

Structure Diagram
Structure Diagram

A structure diagram shows how the program is structured and in some cases how data can be passed from one part to the other.

Pseudocode

Pseudocode is an informal text description of the working of a program it is written using English words but not in a sentence structure. There are no syntax rules due to its informal nature, sometime they are numbered and sometimes they are not.

The SQA can sometimes refer to pseudocode in the exam when describing a program. However, they are often referring to Standard Reference Language. Rule of thumb, if they are asking you to read pseudocode it will be SRL, if they are asking you to write psuedocode then they mean psuedocode. Hopefully they will start using the correct terms in future papers.

Example 1

  1. set total = 0
  2. set count =0
  3. while count less than 10
  4.     get nextInput from user
  5.     add nextInput to total
  6.     add one to count
  7. end while
  8. display total/10

Example 2

get age from user
while age < 0 or age >130
    display error
    get age from user

display age

Higher – Testing and Documenting Solutions (Revision)

  •  Constructing a Test Plan: A set of test data which has been created to systematically and comprehensively to test the software; makes use of the following test data
    • normal – ensures the program works when used normally
    • extreme – ensures the program works when data is used that is on the boundaries of what is considered normal
    • exceptional – ensures a program can handle situations that it has not been designed to cope with; out with the boundaries
  • Comprehensive Testing: when every aspect of the software is tested
  • Syntax Error: a misspelling of a keyword or mistake in the structure of a program such as missing an ‘end if’
  • Logic Error: program will run but not as the programmer intended it to; for example when calculating the average it should be (a+b)/2 instead of a+b/2
  • Execution Error: an error occurs when the program is run, causing it to crash
  • Dry Runs: manual run through of pseudocode or source code of program, taking notes of the values of variables at various points in the process
  • Trace Tables: similar to the table used during a dry run but is often used to test an algorithm for a specific sub program
  • Breakpoints: a set point in a program where it will stop execution so that the values of variables can be examined

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to edit and publish this here.

Higher – Reading Standard Reference Language

I would like to remind you that there is no requirement to write answers using Standard Reference Language (SRL). The SQA can sometimes refer to Standard Reference Language as “Pseudocode”, however, as I have previously explained this is not the case. Pseudocode is an informal design that explains a programs function using English like structure.

Examples

Read in a number representing a temperature in degrees Celsius and write it out as a value in degrees Fahrenheit. If the Celsius value is c, then the Fahrenheit value, f, is calculated as follows: f = ( 9 / 5 ) * c + 32.

RECEIVE c FROM (INTEGER) KEYBOARD 
DECLARE f INITIALLY ( 9.0 / 5.0 ) * c + 32 
SEND f TO DISPLAY

Read in 10 numbers and write out the average of those numbers.

DECLARE total INITIALLY 0 
DECLARE count INITIALLY 0 
WHILE count < 10 DO 
    RECEIVE nextInput FROM (INTEGER) KEYBOARD 
    SET total TO total + nextInput 
    SET count TO count + 1 
END WHILE 
SEND total / 10.0 TO DISPLAY

When reading SRL start at the top, working down each line. Take a note on scrap paper of the values given to variables. In SRL constructs start with their NAME and finish with an END and their name. Subprograms can either be a PROCEDURE or FUNCTION, these are named and have parameters (arguments) in parenthesises, functions will have one or more RETURN statements.

Tips

  • If you are asked for the results of the program then pay attention to the IF statements to make sure that you branch the program correctly. Check the number of repetitions on loops as well.
  • If you are asked to spot an error in the code it will more than likely be a logical error rather than a syntax error.

There is an online Haggis (SRL) checker here, remember you don’t need to write SRL just read it.