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
Attributes and the properties of a class
- 3 things to know
- AS Unit 1
Overview
Attribute of a class, saying that attributes represent the properties of a class and instance attribute.
What you need to know
Answer each one before you reveal it.
What is the difference between the attributes of a class and the values held by one object?
What is meant by saying that attributes represent the properties of a class?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is an attribute of a class?
Model answer
An attribute is a named data item declared in a class, of a stated type, whose value describes one characteristic of an object of that class.
- 2
What is meant by saying that attributes represent the properties of a class?
Model answer
Each attribute names one property that every object of the class possesses, so the list of attributes is a statement of what the class knows about itself.
- 3
How does an attribute differ from a method?
Model answer
An attribute stores a value that describes an object, whereas a method is a block of code defining something the object can do.
- 4
Why must every attribute be declared with a type?
Model answer
The declared type fixes how much memory the attribute needs, which values are legal in it and which operations may be applied, so the compiler can reject nonsense such as multiplying a name by a date.
- 5
For a class Pupil, name four sensible attributes and give a suitable type for each.
Model answer
Suitable attributes are name held as a String, dateOfBirth held as a date type, yearGroup held as an int, and hasPaidFees held as a boolean.
- 6
A class Product must store a price. Recommend a type and justify the recommendation.
Model answer
A price is best held as a whole number of pence in an integer type, or in a decimal type designed for currency, because a double introduces rounding errors that accumulate across a bill.
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.