11.2 Constructs
259 questions in this subtopic. Open a question to solve it and check the official answer.
Constructs · 5 marks · official answer ready
(i) The procedure POP outputs the last element that has been pushed onto the stack and replaces it with a '*'. Complete the pseudocode for the procedure POP. PROCEDURE POP IF ……………
Constructs · 4 marks · official answer ready
(d) The student uses sound editing software to edit the sound file. Name two features of sound editing software the student can use to edit the sound file. Describe the purpose of…
Constructs · 2 marks · official answer ready
(ii) The database administrator needs to alter the USER table. A new field, Country, needs to be added. Write an SQL script to add the field Country to the USER table. ...........…
Constructs · 2 marks
7 A zoo has a computer system for the visitors to access multimedia content about the zoo and its animals. (d) This computer system has Random Access Memory (RAM) and Read Only Me…
Constructs · 9 marks · official answer ready
4 (a) A structure chart is used in modular program design. Iteration and selection are two features of an algorithm that may be shown on a structure chart. Give three other featur…
Constructs · 2 marks · official answer ready
(b) Editing functions such as cut, copy and paste are features provided by an Integrated Development Environment (IDE). Give two additional features of an IDE that are helpful whe…
Constructs · 9 marks · official answer ready
(c) The information is stored in a text file, ScoreDetails.txt. The format of each line of the text file is as follows: • MembershipNumber is a four-digit numeric string. • Date i…
Constructs · 5 marks · official answer ready
(i) Program variables have values as follows: Variable Value Mark 60 Subject "Computer Science" Grade 'B' CourseCompleted TRUE AverageMark 49.5 Evaluate each expression in the fol…
Constructs · 2 marks · official answer ready
(i) This pseudocode includes features that make it easier to read and understand. State two such features. Feature 1 ..............................................................…
Constructs · 2 marks · official answer ready
(ii) State two additional features that should be used to make this pseudocode easier to read and understand. Feature 1 ...........................................................…
Constructs · 2 marks · official answer ready
(i) There is a mistake in the pseudocode that would produce a data type mismatch error if a programmer were to write similar program code. Describe this mistake and how it may be …
Constructs · 4 marks · official answer ready
(ii) Lines 17 to 22 of the pseudocode could be written in a simplified form. Re-write the lines in a simplified form. .............................................................…
Constructs · 4 marks · official answer ready
(c) The program needs a function, GetNumber(), to return a valid membership number. A valid membership number is a four-digit numeric string between “1111” and “9999”. The structu…
Constructs · 5 marks · official answer ready
(i) Program variables have values as follows: Variable Value Quality 'D' DayNumber 20 MyName "Stephen" QualityConfirmed TRUE Factor 6.5 Evaluate each expression in the following t…
Constructs · 2 marks · official answer ready
(a) This pseudocode includes features that are examples of good practice. Explain why it is useful to include the two following features. Comments ................................…
Constructs · 9 marks · official answer ready
(b) Study the function GradeCalc(). Identify the features of the function in the following table. Feature Answer A line number containing an example of an integer assignment state…
Constructs · 2 marks · official answer ready
(i) There is a mistake in the pseudocode that would produce a data type mismatch error if a programmer were to write similar program code. Describe this mistake and how it may be …
Constructs · 4 marks · official answer ready
(ii) Lines 14 to 30 of the pseudocode on page 4 could be written using a CASE structure. Write the equivalent CASE structure in pseudocode. .......................................…
Constructs · 10 marks · official answer ready
(c) The strings are stored in a text file, ScoreDetails.txt. The program needs a function, GetAverageScore(). The structured English representing the algorithm for this function i…
Constructs · 5 marks · official answer ready
(a) Complete the JSP structure diagram for this music service from the pseudocode given. Music Service [5] 7
