Chapter 1 & 2

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:44 AM on 9/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

45 Terms

1
New cards

What does a functional requirement describe?

What the solution must do

Functional requirements state required inputs, processing, validation, behaviours and outputs — what the solution must DO.

2
New cards

What does a non-functional requirement describe?

A quality attribute (e.g. usability, reliability)

Non-functional requirements describe quality attributes — usability, reliability, portability, robustness, maintainability — not a specific function.

3
New cards

What is a constraint?

An external factor that limits or restricts the solution

Constraints limit/restrict the solution: economic (time, cost), technical (hardware, storage, speed, security), social/legal/usability (expertise, privacy, IP, accessibility).

4
New cards

What does 'scope' define?

The solution boundary — what it will and will not do

Scope explicitly states what the solution will do and will not do, preventing scope creep and later disagreement.

5
New cards
<p><span>What information does a data dictionary typically record for each element?</span></p>

What information does a data dictionary typically record for each element?

Name, data type/structure, format, purpose, source, size, validation

A data dictionary defines elements like variables, arrays, records — NOT screen layout (that's a mock-up) or algorithm sequence (that's an IPO chart/pseudocode).

6
New cards
<p><span>An IPO chart separates a process into which three parts?</span></p>

An IPO chart separates a process into which three parts?

Input, Process, Output

Input = data entering the system; Process = the transformation/algorithm; Output = the resulting information.

7
New cards

Which data type suits a Victorian postcode, and why?

Text, because it's an identifier not used in calculations and preserves leading zeroes

A postcode is an identifier, not a quantity for arithmetic. Text storage preserves leading zeroes and fixed-length formatting.

8
New cards

What can integer overflow cause?

Invalid/wrapped results, crashes, or security exploits

Integer overflow happens when a value exceeds the type's representable range — this can wrap the result, crash the program, or be exploited.

9
New cards

How is a one-dimensional array different from a two-dimensional array?

1D uses one index (linear list); 2D uses two indices (row/column grid)

1D array = linear collection, one index. 2D array = rows and columns, two indices [row][column] — suited to grids, seats, boards.

10
New cards

Why is a record suitable for storing one student's ID, name, average score and active status?

It describes one entity with varying data types, accessed via named fields

A record groups related fields describing ONE entity, and fields may have different data types (text, integer, Boolean), accessed as record.field.

11
New cards

What is a XML file and CSV file?

A CSV file is a plain text file that stores simple table data using rows and columns separated by commas, while an XML file is a text file that organizes complex, nested data in a tree-like hierarchy using descriptive tags.

12
New cards

What is CSV best suited for, and what is a key limitation?

Best for simple flat, tabular row/column data; poor for complex hierarchical data

CSV (comma-delimited) suits simple tabular data and spreadsheet exchange, but is inefficient for large/complex hierarchical data.

13
New cards

Why would XML be recommended over CSV for exchanging bookings with nested passengers, flights and meal preferences?

XML's hierarchical parent-child structure represents nested/repeated data; self-descriptive tags aid cross-system interpretation

XML handles nested/hierarchical structures naturally, unlike flat CSV which would need duplication or multiple linked files.

14
New cards

What does an XML document require exactly one of?

Root element

XML has exactly one root element, which may contain many parent and child elements beneath it.

15
New cards

What is camelCase, e.g. totalOrderCost?

Words joined with no spaces, each word after the first capitalised

camelCase joins words without spaces, capitalising each word after the first (contrast with snake_case: total_order_cost).

16
New cards

What does Hungarian notation add compared to camelCase, e.g. arrEmployees?

A prefix indicating the element's data type, structure or purpose

Hungarian notation prefixes a name to show type/structure (e.g. i for integer, arr for array, str for string).

17
New cards

What is internal documentation, and how does it affect program execution?

Notes/comments in source code; ignored by the compiler, doesn't change execution

Internal documentation (comments) is ignored by the compiler/interpreter — it explains code but doesn't affect execution or speed.

18
New cards

Why is the comment '# increase count by one' above 'count ← count + 1' considered poor documentation?

It merely restates the obvious code and adds no purpose/reasoning

Good comments explain WHY, not restate obvious operations. Trivial comments create clutter without adding understanding.

19
New cards

Why doesn't internal documentation replace version control?

Version control tracks changes over time, supports collaboration, and allows restoring earlier versions — comments can't reliably do this

Comments may note some revisions, but version control systematically tracks every change, enables collaboration, and allows restoring past versions.

20
New cards

What are the three main components of an object description?

Properties/attributes, methods/behaviours, events

Properties = stored characteristics/state; methods = operations/behaviours; events = occurrences the object responds to (e.g. a click).

21
New cards

Why convert CSV data to integer/float before doing calculations?

CSV data is always stored/read as text/character values

Values in a CSV are text as read from the file, so numeric fields must be parsed/converted before arithmetic.

22
New cards

Chapter 2

23
New cards

What does AI-assisted programming primarily support?

Prompt-driven code generation, debugging, testing and optimisation

AI tools can generate code from prompts, help debug, generate/run tests and suggest optimisations — but the output still needs human review against requirements.

24
New cards

A class is best described as...

A programmer-defined template of attributes and methods

A class is the template; an object is an instantiated instance of that class that exists in memory.

25
New cards

Abstraction in OOP means...

Exposing essential features while hiding implementation detail

Abstraction manages complexity by exposing a simple interface (e.g. play(), pause()) while hiding the complex implementation.

26
New cards

Encapsulation protects an object mainly by...

Bundling data with methods and controlling access (e.g. private data, public methods)

Private data can only be changed via controlled public methods, protecting data integrity.

27
New cards

Generalisation is...

The process of identifying shared features and creating a superclass

Generalisation extracts common features into a superclass; inheritance is then the mechanism a subclass uses to receive and specialise them.

28
New cards

A local variable...

Exists only within its declaring function/block, normally only while it executes

Limited scope isolates the variable and its temporary lifetime frees memory after execution.

29
New cards

A constant...

Is assigned once and cannot be altered during execution

Constants prevent accidental change and centralise fixed values, improving readability and maintainability.

30
New cards

The three fundamental control structures are...

Sequence, selection, iteration

Sequence, selection and iteration are the three fundamental control structures.

31
New cards

A WHILE loop compared to a REPEAT/UNTIL loop...

Tests before the body, so may run zero times

WHILE is pre-test (may execute zero times); REPEAT/UNTIL is post-test (executes at least once).

32
New cards

Parameter vs argument:

Parameter = named placeholder in the function definition; argument = actual value passed at the call

A parameter is declared in the function; an argument is the actual value supplied when calling it.

33
New cards

Selection sort works by...

Repeatedly finding the smallest remaining value and swapping it into position

It scans the unsorted portion for the smallest element and swaps it into the next sorted position, repeating until sorted.

34
New cards

Quick sort's average-case time complexity is...

O(n log n)

Average case is O(n log₂n); worst case (highly unbalanced partitions) degrades to O(n²).

35
New cards

Binary search requires...

A sorted list

Binary search relies on ordering to safely discard half the remaining search space each step.

36
New cards

Linear search vs binary search efficiency:

Linear search is O(n); binary search is O(log₂n)

Binary search's O(log n) growth outperforms linear search's O(n) for large, frequently-searched sorted lists.

37
New cards

A range check validates that...

A value falls within acceptable limits or values

A range check confirms the value lies within acceptable limits (e.g. 12–17 inclusive).

38
New cards

A required field left blank needs which validation technique?

Existence check

An existence check confirms that a required value has been entered.

39
New cards

Boundary testing should include values...

Immediately below, at, and immediately above each boundary

Systematic boundary testing checks below/at/above each limit using the smallest meaningful increment.

40
New cards

A syntax error...

Violates the language's grammar and normally prevents the code running

A syntax error is a mistake in the grammar, structure, or punctuation of code that prevents a computer program from running at all

41
New cards

A logic error is best identified by...

Comparing expected vs actual results and tracing execution

Logic errors run without crashing, so the compiler gives no location — tracing/trace tables are needed.

42
New cards

Which runtime errors match: dividing by zero, exceeding a type's storage capacity, and accessing outside array bounds?

divide by zero, overflow, index out of range

Divide by zero, overflow and index out of range are three key runtime errors (along with type mismatch).

43
New cards

A breakpoint is used to...

Pause execution at a line so variables/state can be inspected

A breakpoint pauses execution so the developer can inspect variables and step through subsequent instructions.

44
New cards

Test data vs test case:

Test data = selected input; test case = full procedure with input, expected and actual result

Test data is just the input; a test case is the complete documented procedure used to decide pass/fail.

45
New cards

A trace table is used to...

Desk-check an algorithm by recording each executed statement and changing variable values

Comparing traced actual results with expected results helps reveal logic errors.