End of Unit Quiz – Unit 2.3 Producing robust programs
ai. Maintainability of code allows a team of Programmers to work effectively. One way of improving maintainability of code is to use comments. What is meant by using comments in code?
aii. Explain using an example why you should use comments in code.
bi. Another way of improving maintainability of code is to use indentation. What is meant by indentation?
bii. Why should you use indentation? Give an example.
Version 1 1 © OCR 2017
a. Why is it important that a business has robust validation on their registration web page?
b. What are two examples of validation that a business can implement on their registration page?
The program below outputs the correct size of football for a certain age using the information from the table. The program should also output the circumference and weight.
01 Input age
02 Select age
03 Case Is >12
07 Case Is >8 AND <=11
11 Case Is <=8
15 End Select
16 Ball_Info=”The correct size is:” & ” “ & size & “ “ & “With a Circumference of” & Circumference & “ “ _& “and a weight of” & “ “ & weight &”.”
17 OUTPUT BallInfo
ai. What line is the Syntax error is on?
aii. Justify your answer for (ai).
bi. What line is the Logic error on?
bii. Justify your answer for (bi).
4. What is the purpose of testing?
a. How could a software company use iterative testing to develop an app?
b. How could the software company use final testing to develop the product?
6. Complete the definitions for the types of testing below:
Reason for use
7. John has to write a program to convert exam marks out of 100 to a Grade.
A=80+, B=70-79, C=60-69, D=50-59, E=40-49, F=30-39, G=20-29, U=0-19
Complete the table below by stating the marks to be tested, the reason for test and the expected outcome. The first row has been completed for you.
Reason for test
Test a valid input between 0-100 to check the correct grade is output.
8. When designing computer systems it is important to plan for contingencies. This is very important because it will allow developers to account for situations that were not planned.
What are two situations that might occur and what contingency could be planned to account for them?
9. Software can be misused in a number of ways. The table below lists statements that state acceptable use or software misuse. Tick one box in each row to show which use applies.
Making a copy of licensed software to give to a friend.
Changing the default settings to suit your personal needs.
Copying company data onto a secondary storage device
Using somebody else’s...