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
Testing an Object Oriented Application
Testing a class method by method
- 3 things to know
- AS Unit 1
Overview
Exercising one method at a time with the object in a known state, checking what it returns and what it changes, and testing methods that depend on the order they are called in.
What you need to know
Answer each one before you reveal it.
How is a single method tested?
Which two things are examined after a method call?
Questions from this subtopic
Each one with the model answer underneath.
- 1
How is a single method tested?
Model answer
A method is tested by creating an object in a known state, calling the method with chosen arguments, and comparing both the value returned and the values the object then holds with what was expected.
- 2
Which two things are examined after a method call?
Model answer
The value returned is examined, and the object's own attributes are examined through its accessors to confirm the method changed exactly what it was supposed to change.
- 3
How is a method that returns nothing tested?
Model answer
A method returning nothing is tested by reading the object's state through its accessors afterwards, or by examining the effect it had on an object it was given.
- 4
How is a getter tested?
Model answer
A getter is tested by creating an object holding a known value and confirming that the method hands that same value back unchanged.
- 5
How is a setter that validates its argument tested?
Model answer
A setter is tested with a valid value that must be stored, with a value just outside the limit that must be refused, and with the value exactly on the limit to settle whether the limit is included.
- 6
A setter accepts a percentage from 0 to 100, and a test calls setRate(100) and then getRate(). What result confirms the edge is handled correctly?
Model answer
The getter must hand back 100, which shows the value sitting on the upper limit was accepted rather than wrongly refused as too large.
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 Testing an Object Oriented Application, 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.