(Done) 2. Design, Testing and IDEs Flashcards

1
Q

What are structure diagrams

A
  • Diagrams that show the smaller tasks of a larger programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Features of structure diagrams

A
  • The programs you want to write is split up into manageable modules
  • Each of those modules is decomposed even smaller modules and eventually into modules that perform individual tasks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Advantages of structure diagrams (5)

A
  • Easier to write code to carry out individual tasks
  • Makes cooperation easier as each module can be written individually
  • Its easier to test as each module is independent
  • Each module can be updated independently
  • able to reuse the modules in the future
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define a program being easy to maintain

A
  • It is easy for other programmers to add onto or repair the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What features of a code can improve the maintainability

A
  • Comments explaining key features of the program
  • Indentation separating different segments of the program
  • Accurate naming of Variables, sub programs and parameters
  • Using sub programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of defensive design

A
  • To ensure a program functions properly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define program misuse

A
  • The user doing things the programmer does not expect them to do
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Methods of defensive design

A
  • Anticipating how users might misuse their program and attempt to prevent it
  • Ensure their code is well maintained
  • Reduce the number of errors in their code through testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define input validation

A
  • Checking if data meets certain criteria before passing it into the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is input validation used

A
  • To prevent accidental or intentional misuse of a program when entering data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Types of Input validation

A
  • Range check
  • Presence check
  • Format check
  • Look-up table
  • Length check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a range check

A
  • Checks whether the data is within a specified range
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a presence check

A
  • Checks whether data has actually been entered
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a format check

A
  • Checks the data has the correct format (e.g. a date)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a look-up table

A
  • Checks the data against a table of acceptable values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a length check

A
  • Checks the data is the correct length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does authentication do

A
  • Confirms the identity of a user before they’re allowed to access certain pieces of data or features in the program (e.g. passwords)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Common ways to increase the security of a password based system

A
  • Force users to use strong passwords and get them to change them regularly
  • Limit the number of failed authentication attempts before an account is lost
  • Ask for a random selection of characters from the password on each authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Types of errors

A
  • Syntax errors
  • Logic errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Define syntax errors

A
  • When the compiler or interpreter doesn’t understand something due to and error in language rules or grammar
21
Q

Define logic errors

A
  • When the compiler or interpreter is able to run the program, but the program does something unexpected
22
Q

How are syntax errors diagnosed

A
  • They’ll be unable to translate the source code and a syntax error (with it’s location) will be returned
23
Q

How are logic errors diagnosed

A
  • Compilers and interpreters will not detect them
  • Diagnosed by systematically testing the program
24
Q

Two main types of testing

A
  • Iterative testing
  • Final testing
25
Define iterative testing
- The program is tested while it is being developed
26
Define final testing
- The program is tested at the end of the development process
27
What will be contained within a test plan
- The outline of exactly what you are going to test and how you are going to test it
28
Types of test data
- Normal data - Boundary data - Invalid data - Erroneous data
29
Define normal data
- Things that a user is likely to put in a program
30
Define boundary data
- Values at the limit of what the program should be able to handle
31
Define invalid data
- Inputs with a correct data type that should be rejected by the program
32
Define erroneous data
- Inputs with an incorrect data type that should be rejected by the program
33
Features of high-level languages (6)
- One instruction is many machine code instructions - Same code will work for many different machines and processors - The programmer can easily store data without knowing about the memory structure - Code is easy to read, understand and modify - Must be translated before a computer is able to understand it - Not much control over what the CPU actually does so programs will be less memory efficient and slower
34
Features of low-level languages (6)
- One instruction of assembly code is usually one instruction of machine code - Usually written for one type of machine or processor, won't work on any others - The programmer needs to know about the internal structure of the CPU and how it manages memory - Code is difficult to read, understand and modify - Machine code can be executed directly without a translator - Control of what the CPU does so programs are more memory efficient and faster
35
Features of a compiler (4)
- Translates all of the source code at the same time and creates an executable file (exe) - Only needed once to create an exe - Returns a list of errors for the entire program once compiling is complete - Once compiled the program runs quickly but compiling can take a long time
36
Features of an interpreter (4)
- Translates and runs the source code one instruction at a time - Needed every time you want to run the program - Returns the first error it finds and then stops the program - Program will run more slowly because the code is being translated as the program is running
37
Define IDE
- A piece of software that provides features to help a programmer develop their program
38
Parts of an IDE (6)
- Code editor - Run-time environment - Explorer window - output window - Error diagnostic and debugging tools - Breakpoints
39
Function of a code editor
- Where the code is written, usually has line numbering and auto-color coding
40
Function of a run-time environment
- Allows the code to be run quickly via a start or run button
41
Function of a explorer window
- Helps navigate through programs
42
Function of an output window
- To show the output from a program when it is run
43
Function of error diagnostic and debugging tools
- To help find and fix errors in a program
44
Function of breakpoints
- Stop the program of certain lines so you can gather information like value of variables whilst the program is running
45
Features of an IDE
- Translator - Auto-documentation - GUI builder
46
Features of a translator
- Compiler, interpreter or both - Allows the source code to be interpreted by the computer
47
Features of Auto-documentation
- Helps with maintenance - Can extract certain features of a program, variable names, sub program names and comments stored in a separate document
48
Features of a GUI builder
- Helps the programmer design a user interface by building it graphically rather than having to design it using source code