OLD PROGRAMMING CARDS Flashcards

1
Q

What are the standard algorithms?

5

A
  • Input Validation
  • Count Occurence
  • Linear Search
  • Find Min
  • Find Max
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Standard Algorithms:

Input Validation Code

A

start fixed loop
get input from user
conditional loop - while input not match conditions
display error message
get input from user
end conditional
end fixed loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Standard Algorithm:

Count Occurence Code

A

total = 0
get value from user
fixed loop
if array index = value
total = total + 1
end if
next
display message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Standard Algorithms:

Linear Search Code

A

found = false
counter = 0
get search value input
Do
if searchValue = array index then
found = true
msgbox(β€œThe program found the value at position β€œ & counter)
else
counter = counter + 1
endif
loop until counter = end of array or found = true
if found = false
display message
end if

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Standard Algorithms:

Find Min

A

min = first array index
fixed loop
if array index is less than min then
assign value to min
end if
next
display message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Standard Algorithms:

Find Max

A

max = first array index
fixed loop
if array index is more than max then
assign value to max
end if
next
display message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can variables be declared as?

2

A
  • Local
  • Global
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Local Variable Defintion

2

A
  • A variable declared in a sub program
  • Scope of variable is the sub program it is declared in
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Global Variable Defintion

A
  • A variable that is declared outwith a sub program
  • Scope of variable is the entire program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Implementation:

Parallel Arrays Definition

A

Arrays used in conjuction of each other so programmers can display information together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Implementation:

Records Definition

A

Programmer defined data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Implementation:

How can multiple data types be held in one array?

A

By creating a record structure and declaring an array of records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Implementation:

Record Structure Code

A

Structure NAME
public NAME as DATATYPE
public NAME as DATATYPE
public NAME as DATATYPE
End Structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Implementation:

Array of Records Code

A

Dim ARRAYNAME(num) as **NAME*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Implementation:

Module Programming Examples

3

A
  • Sub-Program
  • Procedure
  • Function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Implementation:

Sub-Program Definition

A

A block of code that can be called and accessed by the main program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Implementation:

Procedure Defintion

A

Sub-programs designed to perform a series of commands with values sometimes passed to/from another part of the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Implementation:

Function Definition

A

Sub-programs designed to always return a single value to another part of the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Implementation:

Formal & Actual Parameters

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

Implementation:

What is parameter passing?

A

When a local variable is passed from one sub program to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Implementation:

What are the ways a parameter can be passed?

2

A
  • By reference
  • By value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Implementation:

By Reference Definition

A

The sub-program has direct access to the memory location holding the value. This means any changes to the value being held will be stored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Implementation:

By Value Definition

A

The sub-program is given a temporary copy of the value being held in the variable. The value can be changed, but this will not be stored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Implementation:

How must arrays be parameter passed?

A

By Reference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
# Implementation: What is a pre-defined function?
Code built into the software that does not need to be created by a programmer
26
# Implementation: What are the pre-defined functions? | 4
* Character to ASCII * ASCII to Character * Decimal to Integer * Find the Remainder
27
# Implementation (pre-defined functions): Character to ASCII Code
Asc("A") **Returns 65**
28
# Implementation (pre-defined functions): ASCII to Character Code
Chr(65) **Returns A**
29
# Implementation (pre-defined functions): Decimal to Integer Code
CInt(3.14) **Returns 3**
30
# Implementation (pre-defined functions): Find the Remainder Code
13 mod 2 **Returns 1**
31
# Implementation: What are substring functions?
Functions that manipulate a whole string or extract a number of characters from a string, depending on the function
32
What are the substring functions? | 4
* Left * Right * Mid * Uppercase
33
# Implementation (sub-string functions): Left Code
*Word = "Hello!"* MsgBox(Microsoft.VisualBasic.Left(**VARIABLE**, **CHAR NUM**)) **Returns H**
34
# Implementation (sub-string functions): Right Code
*Word = "Hello!"* MsgBox(Microsoft.VisualBasic.Right(**VARIABLE**, **CHAR NUM**)) **Returns !**
35
# Implementation (sub-string functions): Mid Code
*Word = "Hello!"* MsgBox(Microsoft.VisualBasic.Mid(**VARIABLE**, **CHAR NUM**)) **Returns ll**
36
# Implementation (sub-string functions): Uppercase Code
*Word = "Hello!"* MsgBox(UCase(word)) **Returns HELLO!**
37
# Implementation: What is a sequential file used for?
To hold the data in a set sequence/order
38
# Implementation (sequential files): What are the file operations? | 5
* Create * Open * Close * Read * Write
39
# Development Methodologies: What are the development methodologies? | 2
* Iterative * Agile
40
# Development Methodologies: What does the iterative process involve? | 2
* Programmers move from stage to stage in order, only revisiting stages where necessary and a problem is discovered * It is a very structured process and clients are only communicated with at the beginning and end of development
41
What does the agile process involve? | 2
* Uses 'sprints' which are periods of planned analysis, design, implementation and testing of a particular aspect of software * It is a flexible process that is based on team work and daily communicated which is suited to small, short term projects rather than larger scale projects
42
# Development Methodologies: Iterative Strengths | 4
* Rigid planning structure * Good for large teams * Helps to plan and track large software projects * Clear agreement on outcomes at start of project
43
# Development Methodologies: Iterative Weaknesses | 4
* Very rigid approach does not deal well with mid-project changes * Can over-complicate simple projects * Unidentified issues at the analysis stage can be time-consuming and costly to gix * Little involvement of client after analysis
44
# Development Methodologies: Agile Strengths | 4
* Copes well with little cumulative changes as the project progresses * Good for small scale projects like most apps * Ongoing involvement of client allows changes to be agreed quickly * Changes cause less delay or can be tackled in the next version
45
# Development Methodologies: Agile Weaknesses | 4
* Works best with small teams * Needs close version control and tracking of changes * Can be difficult to determine the full scope of the project in the early stages * Usually no legally binding agreement at the start
46
# Testing: Reasons for Testing | 3
* Identify errors * Show that all functional requirements have been met * Ensure efficient and maintainable code
47
# Testing: Test Data Types
* Normal * Extreme * Exceptional
48
# Testing: Error Types Causing Program to Crash | 2
* Syntax * Execution / Run-Time
49
# Testing: Error Type Causing Unexpected Result
Logic
50
# Testing: Syntax Error Examples | 2
* Spelling mistakes * Mistake in the programming language rules
51
# Testing: Execution Error Examples | 4
* Dividing by 0 * Using an array index value that doesn't exist * Writing to a file that doesn't exist * Trying to read/write beyond the end of a file
52
# Testing: Logic Error Examples | 3
* Using the wrong variable * Using the wrong logic operator (and/or/not) * Using the wrong conditional logic ( < > )
53
# Testing: What is a dry run? | 2
* When a programmer works through the program on paper following the code line by line to pick up logic errors * Often used with trace table
54
# Testing: What is a trace table?
Consists of the variables used in a specific programmer and allows the developer to track the values being stored at different points throughout the program
55
# Testing: What is a breakpoint? | 2
* A user-defined point in the program where the code will stop executing, and the value of variables can be inspected to ensure they are correct * Often used with trace tables
56
# Testing: What is a watchpoint? | 2
* A point placed on a specific variable to track any changes in value, program will stop when the value of the variable changes * Used with breakpoints to look at the value of only specific variables when a breakpoint is triggered
57
# Design: What is top down, stepwise refinement? | 2
* Any main steps from the design are known as the top down design * These main steps are usually broken down further into step by step instructions known as stepwise refinements, which helps the programmer break down the program into manageable modules
58
# Design: What are the benefits of a modular solution? | 3
* Different programmers can implement different parts of the design * Each part of the design can be tested seperately * Design shows the main process clearly
59
# Design: What does a data flow do?
Shows the information that will flow in and out of sub-programs
60
# Design: What are the design techniques? | 3
* Psuedocode * Structure Diagram * Wireframe
61
# Design: Pseudocode Usage
62
# Design: Structure Diagram Usage
63
# Design: Wireframe Usage
64
# Evaluation: What criteria is evaluated in a program? | 5
* Fitness for purpose * Efficient use of coding constructs * Usability * Maintainability * Robustness
65
# Evaluation: Fitness for purpose
66
# Evaluation: Efficient use of coding constructs
67
# Evaluation: Usability
68
# Evaluation: Maintainability
69
# Evaluation: Robustness
70
# Analysis: What is the role of a systems analyst? | 2
* Meeting with the client and discussing their specific needs * Creating a detailed project proposal
71
# Analysis: What is the software specification?
Defined extent of the software and a legal contract between the client and the developers
72
# Analysis: What is the role of developers in software specifications?
Legally obliged to create the specified software
73
# Analysis: What is the role of a client in software specifications
Legally obliged to pay for the software
74
# Analysis: What should analysis include? | 4
* **Purpose:** a general description of the purpose of the software * **Scope:** a list of deliverables that the project will hand over to the client / user * **Boundaries:** the limits that define what is in the project and what is not * **Functional Requirements:** features and functions that must be delivered by the systems in terms of inputs, processes and outputs