The application form below was used by a talent search organisation for candidates to enter a song writing competition - NSC Information Technology - Question 5 - 2023 - Paper 2
Question 5
The application form below was used by a talent search organisation for candidates to enter a song writing competition.
BEST SONG WRITER COMPETITION
Name _________... show full transcript
Worked Solution & Example Answer:The application form below was used by a talent search organisation for candidates to enter a song writing competition - NSC Information Technology - Question 5 - 2023 - Paper 2
Step 1
Motivate the use of selection components rather than entry fields for obtaining information from users.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Selection components, such as drop-down menus and radio buttons, are preferred for gathering information because they ensure validation. They limit user input to predefined options, reducing errors that can occur from manual data entry, and improving overall accuracy and data integrity.
Step 2
State the benefit of saving the applicants’ details in a text file rather than using an array.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Saving applicants’ details in a text file allows for permanent storage of information. Unlike arrays which are temporary and only exist in the program’s memory during execution, a text file can be accessed and utilized later without losing the data.
Step 3
Why would a bit button be more suitable to be used instead of a standard button?
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
A bit button is directly linked to a prewritten or provided event or code and typically has an icon that graphically indicates the purpose of the button, providing users with clearer guidance on its function.
Step 4
Give the line number in the code where EACH of the following errors occurs and explain the reason for the error:
5.2.1 Syntax error
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Line 9: The square root of the number value must be assigned to a real variable; the declaration and assignment are incorrect if iSqrt is declared as an Integer. This will lead to a type mismatch.
Step 5
5.2.2 Logical error
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Line 13: The formula should use either 'iSquare := iNumber * iNumber' or 'iSquare := SQRT(iNumber)'. The original formula is incorrect as it mixes operations that should not be performed on different conditions.
Step 6
5.2.3 Runtime error
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Line 15: Division by zero is undefined. The division attempts to use 'iNumber / 0', leading to a runtime error because dividing any number by zero is mathematically impossible.
Step 7
5.3.1 The following two lines of code will result in the same answer:
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Correct. Both statements will evaluate to the same boolean value since if 'bFlag' is true, the negation will render false, and vice versa.
Step 8
5.3.2 The statement NOT bFlag will always produce 'false' as the result.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Incorrect. The statement 'NOT bFlag' will yield true if 'bFlag' is false, and false if 'bFlag' is true.
Step 9
5.4.1 Give the default access modifier status of an attribute of a class.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The default access modifier status of an attribute in a class is 'private', meaning that it is only accessible within the class itself.
Step 10
5.4.2 Why will a method such as a toString method declared as public?
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
A toString method should be declared as public to allow access from other classes or methods outside the object class. This enables the object to provide a string representation of itself to other parts of the program.
Step 11
Copy and complete the trace table in your ANSWER BOOK.
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!