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
Declaring variables, scope and lifetime
- 3 things to know
- AS Unit 1
Overview
Scope of a variable and variable shadowing.
What you need to know
Answer each one before you reveal it.
What is variable shadowing, and how is a shadowed attribute reached in Java?
What two things must every variable declaration give?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a variable?
Model answer
A variable is a named area of memory that holds a value of a stated type and whose contents can change while the program runs.
- 2
What two things must every variable declaration give?
Model answer
Every declaration must give the data type of the variable and the identifier by which the variable will be known.
- 3
How does declaration differ from initialisation, using int count; and int count = 0; as the examples?
Model answer
The statement int count; declares the variable by reserving storage of that type, while int count = 0; also initialises it by placing a first value in that storage.
- 4
What is an identifier, and what three rules must a legal Java identifier obey?
Model answer
An identifier is the name given to a variable, method or class; a Java identifier must not begin with a digit, must contain no spaces and must not be a reserved word.
- 5
Why is the declaration int 2ndScore; rejected by the Java compiler?
Model answer
An identifier may not begin with a digit, because the compiler would otherwise be unable to tell the start of a name from the start of a number.
- 6
What naming conventions apply to variables and to classes in Java?
Model answer
Java names variables and methods in camelCase, beginning with a lower-case letter as in numberOfPupils, and names classes in PascalCase, beginning with a capital as in BankAccount.
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.