Cambridge IGCSE & O Level Computer Science Programming Book for Microsoft Visual Basic Sample

Page 7

We are working with Cambridge Assessment International Education towards endorsement of this title. Any references or material related to answers, grades, papers or examinations are based on the opinion of the author(s). Contents

6 Designing algorithms Top-down design Structure diagrams Design steps The complete design process

7 Subroutines and file handling

Why use subroutines? 141 Subroutines in Visual Basic 142 Functions 143 Procedures 149 File handling 155

8 Checking inputs 8.1 8.2 8.3

Validation 163 Verification 164 Programming validation into your systems 165

When to test 186 Debugging 186 IDE debugging tools and diagnostics 188 Identifying logical errors 190 Dry running 190 Breakpoints, variable tracing and stepping through code 193 Beta testing 195

A

9.1 9.2 9.3 9.4 9.5 9.6

M

9 Testing

9.7

What is an array? Declaring a one-dimensional array

S

11.1 11.2 11.3 11.4 11.5

Concatenation 235 Splitting strings 237 String index 237 Substring 241 Looping through all the characters in a string 244

12 Programming scenario task 12.1 12.2 12.3 12.4 12.5 12.6

Getting started on the question Planning the program Planning your solution Writing your program Checking your program Final thoughts

13 Examination practice

248 249 250 251 253 254

258

Glossary 268 Acknowledgements 271

10 Arrays 10.1 10.2

11 Manipulating strings

P

7.1 7.2 7.3 7.4 7.5

129 129 132 138

Initialising arrays 202 Using arrays 203 Iteration in arrays 208 Grouped data records 212 Two-dimensional arrays 217 Sorting 224 Sorting algorithms 225 Bubble sort 226

LE

6.1 6.2 6.3 6.4

10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10

201 201

Solutions

vii Original material © Cambridge University Press 2021. This material is not final and is subject to further changes prior to publication.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.