May/June 2023 Paper 2

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

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

10 Terms

1
New cards

How can an IDE be used to debug a function like Calculate()?

Breakpoints, single stepping, and variable watch windows can be used to pause execution, step through lines of code one by one, and monitor variable values respectively.

2
New cards

What is the error in Index ← STR_TO_NUM(MID("CPE1704TKS", 4, 2))?

No error.

3
New cards

Describe the algorithm to generate a string of repeated characters.

  1. Input a character MyChar. 2. Input an integer MyCount. 3. Generate a string with MyChar repeated MyCount times. 4. Output the string.
4
New cards

What data structure is suitable for storing customer information?

A record structure, as it allows different types of data (e.g., String, Integer, Date) to be stored under one identifier.

5
New cards

Describe the pseudocode to replace a character in a string.

  1. Loop through each character in the string. 2. If it matches the character to replace, change it to the new character. 3. Concatenate the new string. 4. Return the modified string.
6
New cards

List two disadvantages of the Waterfall Model.

  1. No working software until late in the life cycle. 2. Difficult to adapt to changes in requirements.
7
New cards

What is a more suitable development model for a website that may have changing requirements?

Iterative or Rapid Application Development (RAD).

8
New cards

Describe the purpose of Beta Testing.

Conducted by potential users to check if the software works in real-world conditions, identify bugs, and provide feedback for improvements before the final release.

9
New cards

Which file mode should be used to add new items to Stock.txt?

Append mode, so new data is added to the end of the file without overwriting.

10
New cards

How does sorting a textfileby Numbersimprove search efficiency?

It allows for a binary search, reducing the number of comparisons needed to locate an item.