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
Exception Handling and Managing Input and Output
Checked and unchecked exceptions
- 3 things to know
- AS Unit 1
Overview
The distinction the compiler enforces, which faults must be caught or declared, which are left to the programmer, and why an unchecked exception usually signals a fault in the code rather than in the input.
What you need to know
Answer each one before you reveal it.
Why are file operations made checked?
In Java, why are exceptions caused by programming mistakes left unchecked?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a checked exception?
Model answer
A checked exception is one the compiler insists is dealt with, so any method that might throw it must either catch it or declare it in a throws clause.
- 2
What is an unchecked exception?
Model answer
An unchecked exception is one the compiler does not require to be handled, and it usually signals a programming mistake such as a bad index or a reference holding null.
- 3
Give two examples of checked exceptions.
Model answer
A file not found exception and a general input or output exception are both checked, because no program can guarantee that a file exists or that a device will respond.
- 4
Give two examples of unchecked exceptions.
Model answer
A null pointer exception and an array index out of bounds exception are both unchecked, because correct code should never produce either of them.
- 5
Why are file operations made checked?
Model answer
The success of a file operation depends on the machine outside the program, so the language obliges the programmer to state what should happen when the file is missing, locked or unreadable.
- 6
Why are programming mistakes left unchecked?
Model answer
Demanding a handler for every possible bad index would clutter almost every line of code, and the proper response to a programming mistake is to correct the code rather than to catch the fault.
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 Exception Handling and Managing Input and Output, 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.