A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Skeleton code/2013 Exam/Section C

Validation
Erroneous data – Anything other than “a, b, d, e, g, h, n” (in the original program, an example would be “z” or “2”).

Extreme data-

Typical data – Letters “a, b, d, e, g, h, n” (in the original program).

Variables
Improves readability of code // Easier to update the programming code if the value changes ( A. by implication) // reduce the likelihood of errors;

Any from; Ciphertext, Plaintext, Choice, AmountToShift, StartPosition, EndPosition, SizeOfRailFence, N,MenuChoice, TextFromUser, CharacterFromFile, TextFromFile, Count, Key, TypeOfCharacter, ChangedText, ASCIICode, NoOfColumns, NoOfRows, NoOfCiphertextCharacters, NoOfCiphertextCharactersProcessed, i, j, PostitionOfNextCharacter, LastFullRowNo, AmountToReduceNoOfColumnsTimesjBy, BeginningOfNextRowIndex, HiddenMessage, CurrentPosition.

VB.net = Asc("a")

Count.

EveryNthCharacterSteganography(StartPosition, EndPosition, N)

Plaintext = ""

VB.net - Dim N As Integer

textFromUser

Count

ciphertext

Loops
Count

Sub Routines
When a parameter is passed byRef, the variable inside the routine uses a reference to the same memory location as the variable passed as the parameter. When a parameter is passed byVal, the variable inside the routine copies the value of the calling code's variable to the routine's parameter.

ByRef is used because the procedure is then able to change the value that it was sent when it was called.