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
Operator precedence and evaluation order
- 3 things to know
- AS Unit 1
Overview
Operator precedence and value of true || false && false.
What you need to know
Answer each one before you reveal it.
What is associativity, and which way do the arithmetic operators associate in Java?
What is the value of true || false && false, and in which order are the two operators applied?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is operator precedence?
Model answer
Operator precedence is the set of rules that decides which operator in an expression is applied first when no parentheses say otherwise.
- 2
List the main groups of Java operators in order of precedence, highest first.
Model answer
Highest are the unary operators, then multiplication, division and remainder, then addition and subtraction, then the relational operators, then equality, then logical AND, then logical OR, and lowest of all assignment.
- 3
What is the value of 2 + 3 * 4, and in what order are the operators applied?
Model answer
The result is 14, because multiplication has higher precedence than addition, so 3 * 4 is evaluated to 12 and 2 is then added.
- 4
What is the value of (2 + 3) * 4, and how do the parentheses change the result?
Model answer
The result is 20, because parentheses force the addition first, giving 5, which is then multiplied by 4.
- 5
What is associativity, and which way do the arithmetic operators associate in Java?
Model answer
Associativity decides the order when two operators of equal precedence meet, and the arithmetic operators associate from left to right.
- 6
Which common Java operator associates from right to left? Explain what a = b = 5 does.
Model answer
Assignment associates from right to left, so a = b = 5 first stores 5 in b and then stores the result of that assignment in a, leaving both at 5.
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.