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
Defining Data: Types, Variables and Classes
Relational and logical operators
- 3 things to know
- AS Unit 1
Overview
Value does a relational expression produce and short-circuit evaluation.
What you need to know
Answer each one before you reveal it.
Explain why if (count != 0 && total / count > 5) is safe but reversing the two conditions is not.
Explain the difference between the logical AND written with two ampersands and the version written with one.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Which six relational operators are there, and what does each test?
Model answer
The relational operators test equal to, not equal to, less than, greater than, less than or equal to, and greater than or equal to.
- 2
What type of value does a relational expression produce?
Model answer
A relational expression produces a boolean result, either true or false.
- 3
Explain the difference between = and == in Java, and say what the compiler does with if (x = 5) where x is an int.
Model answer
A single equals sign assigns a value while a double equals sign tests for equality; Java rejects if (x = 5) because the assignment yields an int and the condition of an if must be a boolean.
- 4
Which three logical operators are there, and what does each do?
Model answer
Logical AND is true only when both operands are true, logical OR is true when at least one operand is true, and logical NOT reverses the truth of a single operand.
- 5
Given boolean a = true; boolean b = false; state the values of a && b, a || b and !a.
Model answer
The expression a && b is false because one operand is false, a || b is true because one operand is true, and !a is false because a is true.
- 6
What is short-circuit evaluation?
Model answer
Short-circuit evaluation stops as soon as the result of a logical expression is settled, so the right operand of an AND is skipped when the left is false, and the right operand of an OR is skipped when the left is true.
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 Defining Data: Types, Variables and Classes, 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.