Software development and testing – A Level Computer Science (9618)
Quick quiz: 10 random questions from this topic. Answer them all, then open the Summary.
Question text
2
(a) Examine the following state-transition diagram.
Low level detected | Activate pump
Low level detected
X
S2
S1
Normal level detected | Deactivate pump
Normal level detected
S3
(i)
Complete the table with reference to the diagram.
Answer
The number of transitions that result in a different state
The number of transitions with associated outputs
The label that should replace ‘X’
The final or halting state
[4]
(ii)
The current state is S1. The following inputs occur.
1.
Low level detected
2.
Low level detected
3.
Low level detected
4.
Low level detected
Give the number of outputs and the current state.
Number of outputs …
Current state …
[2]
(b) A system is being developed to help manage book loans in a library.
Registered users may borrow books from the library for a period of time.
(i)
State three items of data that must be stored for each loan.
1 …
2 …
3 …
[2]
(ii)
State one item of data that will be required in the library system but does not need to be
stored for each loan.
… [1]
(iii)
One operation that manipulates the data stored for each loan, would produce a list of all
overdue books.
Identify two other operations.
Operation 1 …
…
Operation 2 …
…
[2]
Question text
7
A coffee shop runs a computerised loyalty card system.
Customers are issued with a loyalty card with their name together with a unique customer ID.
Loyalty points are added to their card each time they spend money at the shop.
The following information is stored for each customer: ID, name, home address, email address,
mobile phone number, date of birth, number of points, date of last visit and amount of money
spent at last visit.
A new module will generate a personalised email message to each loyalty card customer who has
not visited the coffee shop in the last three months. The message will include a unique voucher
code which can be used to authorise a discount if the customer goes to the shop within the next
two weeks.
(a) Identify three items of customer information that will be used by the new module and justify
your choices.
Item 1 …
Justification …
…
Item 2 …
Justification …
…
Item 3 …
Justification …
…
[3]
(b) Identify the computational thinking skill that you needed to use to answer part (a).
… [1]
(c) It is decided to adopt a formal program development life cycle model for the development of
the new module.
The analysis of the new module is complete and the project moves on to the design stage.
During this stage all the necessary algorithms and module designs will be defined.
State three other items that will be defined for the new module during the design stage.
1 …
2 …
3 …
[3]
ĬÏĊ¾Ġ´íÈõÏĪÅĊàû¶Ă×
,
,
(d) Part of the coffee shop program contains three program modules as follows:
•
Module Init() has no parameters and returns a Boolean.
•
Module Reset() takes a string as a parameter and returns an Integer.
•
Module Check() repeatedly calls Init() followed by Reset().
Draw a structure chart to represent the relationship between the three modules, including all
parameters and return values.
[3]
ĬÍĊ¾Ġ´íÈõÏĪÅĊÞù¶Ą×
Question text
2
(a) An algorithm will process data from a test taken by a group of students. The algorithm will
prompt and input the name and test mark for each of the 35 students.
The algorithm will add the names of all the students with a test mark of less than 20 to an
existing text file Support_List.txt, which already contains data from other group tests.
(i)
Describe the steps that the algorithm should perform.
Do not include pseudocode statements in your answer.
…
…
…
…
…
…
…
…
…
…
…
… [5]
(ii)
Explain why it may be better to store the names of the students in a file rather than in an
array.
…
…
… [1]
(iii)
Explain why WRITE mode cannot be used in the answer to part 2(a)(i).
…
…
… [1]
(b) Examine the following state-transition diagram.
Input-A Output-X
Input-B Output-W
Input-B
START
S2
S1
S3
Input-A
Input-A
Input-B
Input-A Output-W
S4
Complete the table to show the inputs, outputs and next states.
Input
Output
Next state
S1
Input-A
S2
Output-W
Output-W
[4]
Question text
2
Examine the following state-transition diagram.
Button-Y
Button-Z | Output-C
START
S1
S3
Button-Z
Button-Y
Button-Y | Output-A
Button-X
S2
S4
Button-Z | Output-B
(a) Complete the table with reference to the diagram.
Answer
The number of different inputs
The number of different outputs
The single input value that could result in S4
[3]
(b) The initial state is S1.
Complete the table to show the inputs, outputs and next states.
Input
Output
Next state
Button-Y
none
Button-Z
S2
none
[4]
Question text
2
A program has been written to implement a website browser and maintenance is now required.
One type of maintenance is called perfective.
Name two other types of maintenance that the program may require and give a reason for each.
Type 1 …
Reason …
…
…
…
Type 2 …
Reason …
…
…
…
[4]
Question text
5
A software developer follows a program development life cycle. The life cycle divides the
development process into various stages.
(a) The following table lists some development activities.
Complete the table by writing the name of the life cycle stage for each activity.
Activity
Name of life cycle stage
A compiler is used.
A program that has been released for general use is modified.
The dry run method is used.
The program structure is specified.
[4]
(b) A software developer has written modules Test_A() and Test_B(). These have been
written but contain errors. These modules are called from several places in the main program
and testing of the main program (integration testing) has to stop.
Identify a method that can be used to continue testing the main program before the errors in
these modules have been corrected and describe how this would work.
Method …
Description …
…
…
…
[3]
ĬÙĊ®Ġ´íÈõÏĪÅĊÝû¸þ×
Question text
5
A software developer follows a program development life cycle. The life cycle divides the
development process into various stages.
(a) The following table lists some development activities.
Complete the table by writing the name of the life cycle stage for each activity.
Activity
Name of life cycle stage
The walkthrough method is used.
An algorithm is implemented in a programming language.
The client is interviewed about problems with the current system.
The program is modified to run on new hardware.
Records and file structures are defined.
[5]
(b) The program contains a validation function.
(i)
The function will:
•
take an integer value as a parameter
•
return TRUE if the value is within the range 24 to 37, inclusive
•
otherwise return FALSE.
Complete the table to define a test plan to thoroughly test the operation of the function.
Type of test data
Test data value
Expected result
Normal
30
TRUE
[4]
(ii)
The function is to be tested on its own. When it is shown to work correctly the function
will be combined with other modules and testing will continue.
Identify the type of testing that this represents.
… [1]
ĬÙĊ®Ġ´íÈõÏĪÅĊÞú¸þ×
Question text
7
An algorithm is represented by a state-transition diagram.
The table shows the inputs, outputs and states for the algorithm:
Current state
Input
Output
Next state
S1
A1
X1
S2
S2
A3
none
S1
S2
A2
X4
S5
S5
A1
X1
S5
S5
A4
X2
S2
S5
A3
none
S3
S1
A9
X9
S3
S3
A9
X9
S4
Complete the state-transition diagram to represent the information given in the table.
A1 | X1
START
S1
A3
[5]
Question text
2
A program to calculate the pay of employees working for a company is being designed.
(a) Stepwise refinement has been used in the design of the program.
Describe stepwise refinement.
…
…
…
… [2]
(b) One of the program modules used to calculate employees’ weekly bonus pay has been
completed. The amount of bonus pay they receive is based on the number of hours worked
and the value of sales made as shown in the table.
Bonus pay and value of sales are both in dollars.
Hours worked
Value of sales
Bonus pay
between 1 and 40 inclusive
2000 or less
0
between 1 and 40 inclusive
above 2000
50
above 40
2000 or less
10
above 40
above 2000
100
(i)
The module is tested using white‑box testing.
State two tests, using valid data, that can be used to test different paths through the
program.
Test one:
Hours worked …
Value of sales …
Bonus pay …
Test two:
Hours worked …
Value of sales …
Bonus pay …
[2]
ĬÕĊ®Ġ´íÈõÏĪÅĊàù·Ā×
,
,
(ii)
The program to calculate pay uses a number of modules which are each called from
different places in the program.
The program is to be tested using stub testing before all the program modules have
been completed.
Describe stub testing.
…
…
…
… [2]
(iii)
The program has been completed and compiles successfully.
The program is tested using black‑box testing.
Identify and describe one type of error that black‑box testing could detect.
Type of error …
Description …
…
…
[2]
Ĭ×Ċ®Ġ´íÈõÏĪÅĊàû·Ā×
Question text
5
A program is developed to satisfy a specific customer requirement.
The project follows a program development life cycle model. This model divides the development
process into several different stages.
(a) The table lists some of the development activities.
Complete the table by writing the name of the life cycle stage for each activity:
Activity
Name of life cycle stage
a structure chart is produced
a program is modified to allow it to run on new hardware
the programmer identifies the customer’s requirements
an Integrated Development Environment (IDE) provides
context-sensitive help such as ‘auto-complete’
[4]
(b) Alpha and beta testing has been completed. The final testing stage is carried out by the
customer.
Identify this final testing stage.
… [1]
ĬÙĊ®Ġ´íÈõÏĪÅĊßûµĀ×
,
,
ĬÛĊ®Ġ´íÈõÏĪÅĊßùµĀ×