CCEA A-Level Software Systems Development CL4
Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures
Exception Handling and Managing Input and Output
Testing an Object Oriented Application
Graphical User Interface Objects and Events
Multiple Forms and Linking to Files
Designing, Testing and Evaluating an Event Driven Application
Reasons for Systems Development and Systems Methodologies
Managing Projects
Testing Strategies
Database Concepts and Entity Relationship Modelling
Normalisation and Structured Query Language
Project Management and the Systems Approach in Practice
Defining Requirements and Documenting the Design
Building a Desktop Solution with a Database
Testing and Evaluating the Solution
Program Control Structures
Sequence and the order of execution
- 3 things to know
- AS Unit 1
Overview
Flow of control in a program and task that is naturally pure sequence.
What you need to know
Answer each one before you reveal it.
Which three basic control structures can any program be built from?
What is a statement, and what is a compound statement?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What does sequence mean as a program control structure?
Model answer
Sequence is the control structure in which statements are carried out one after another in the order they are written, each completing before the next begins.
- 2
Which three basic control structures can any program be built from?
Model answer
The three basic control structures are sequence, selection and repetition.
- 3
Using a total calculated from a price as the example, why does the order of statements within a sequence matter?
Model answer
A statement can only use values that already exist, so calculating total = price * quantity before price has been assigned uses an unset value and gives the wrong answer or refuses to compile.
- 4
int a = 2; int b = 3; a = a + b; b = a - b; — what are the final values of a and b?
Model answer
The third statement makes a equal to 5, and the fourth then makes b equal to 5 minus 3, which is 2, so a finishes at 5 and b at 2.
- 5
In the fragment int p = 2; int q = 3; q = p - q; p = p + q; work through each statement and give the values of p and q at the end.
Model answer
The third statement stores 2 minus 3 in q, giving −1, and the fourth then stores 2 plus −1 in p, so p ends at 1 and q at −1.
- 6
Explain why swapping the contents of two variables needs a third variable, and give the three statements in order.
Model answer
Assigning one variable to the other destroys the value being overwritten, so a temporary variable must hold it first: temp = a; then a = b; then b = temp.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Program Control Structures, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.