Software Design and Development Flashcards
Variable
Used to identify storage locations in memory. Like a memory cell within a program
Assigning a Variable a Value
variable=0/(“P”)/[0,2]
Adding
+
Subtracting
-
Multiply
*
Divide
/
Exponent
Modulo
%
Concatenation
Joining text strings together to form a new text string
Normal Programme Sequence
Input, Process, Output
If statements
Used to let a program select an action depending upon the value of variables held in the program
if variable==”Party”:
print (“Yay!”)
<
Less than
>
More than
<=
Less than or equal to
>=
More than or equal to
==
Equals
=!
Not equal to
And
Both sides of the operator must be true for the statement to succeed
Or
Either side of the operator must be true for the statement to succeed
Fixed Loop
The loop repeats a sequence of code a set number of times (for)
Conditional Loop
Loop keeps repeating code until a condition is met (while)
Pre-Defined Functions
Round
Integer
Random
Round Function
Rounds a value to a specific number of decimal places
Random Function
Returns a random number between two set values
Integer Function
Returns only the integer part of a value
Real
Stores numbers that contain decimal places/values
Character
Stores a single character which can be a letter, number or symbol ($)
String
Stores alphanumeric(numbers and letters) combinations and just text (2k17)
Boolean
Stores True or False Only
Arrays
Let programmers store items in a list
Data Structures
Arrays
Strings
Test Data Types
Normal
Extreme
Exceptional
Normal Data
Data you would expect to work/be accepted that lies within the range
Extreme Data
Data at the lower and upper limits of the range
Exceptional Data
Data that should not be accepted by the program
Errors
Syntax
Logic
Execution/Run-time
Increasing Code Readability
Internal Commentary
Meaningful Variable Names
Indentation
White Space
Common Design Notations
Pseudocode
Flow Charts
Structure Chart
Pseudocode
Looks like code but does not need to be implemented as strictly
Flow Charts
Show what is going on and how data flows around the program
Structure Chart
Breaks problem down into smaller sections
Algorithm
Step-by-step procedure for solving a problem in a finite number of steps
Algorithm Uses
Check data has been entered correctly
Test if a number is even
Calculate a person’s salary
Convert a piece of text from lower case to upper case
Everything Stored As
1’s or 0’s (Binary)
Floating Point Storage
Number stored as mantissa and exponent
Mantissa
All the digits of a number
Exponent (FPA)
Used as a multiplier to move mantissa to correct size
Storing Text
Every character has a standard binary value which is detailed in the ASCII table
Unicode Advantages
Allows for representation of more characters
Unicode Disadvantage
Takes up more storage
Low-level Languages
Like Machine Code
- Hard to read
- Takes up lots of space on screen
- Difficult to spot errors
High-Level Languages
More English Like (Python, Visual Basic)
- Easy to read
- Easy to spot errors
Units
- Bit (1 or 0)
- Byte (8 bits)
- Kilobyte (1024 bytes)
- Megabyte (1024 kilobytes)
- Gigabyte (1024 megabyte)
- Terabyte (1024 Gigabyte)
Translator Types
Interpreters
Compilers
Interpreter
Translates each line before running it. Does one line at a time
Interpreter Advantages
Program will run even if it’s not finished
Easy to find errors
Interpreter Disadvantages
Code has to be translated each time the program is run
Slows program down
Need to have translator program running
Compiler
Translates the whole program and then runs it
Compiler Advantages
Program only needs to be translated once
User doesn’t need translator on their computer
Compiler Disadvantages
Have to wait until whole program is perfect to run it
Have to re-translate whole program each time you make a change
System Bus
Made up of:
- Data Bus
- Address Bus
- Control Bus
Address Bus
Carries address information from the processor to the main memory or peripherals
Data Bus
Carries data between the processor and the memory or peripherals