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
Multiple Forms and Linking to Files
Passing data between forms
- 3 things to know
- AS Unit 2
Overview
Shared data class, one disadvantage of holding data in public global variables and callback used for between forms.
What you need to know
Answer each one before you reveal it.
How does a modal dialog return a value to the form that opened it?
Why can the calling form not read a modeless form's fields immediately after showing it?
Questions from this subtopic
Each one with the model answer underneath.
- 1
Name three ways of getting a value from one form to another.
Model answer
A value is passed through the second form's constructor, set through a public method on it, or held in a shared class both forms can reach.
- 2
What is the advantage of passing a value through the constructor of the second form?
Model answer
A constructor parameter makes the value compulsory, so the second form can never be created without the data it needs to work.
- 3
The Java code FrmEdit f = new FrmEdit("Ana Kelly"); f.setVisible(true); runs, and FrmEdit's constructor contains txtName.setText(n); where n is the parameter. What does the user see?
Model answer
The user sees the edit window open with Ana Kelly already in the name box, because the constructor copied the parameter into the text box before the window appeared.
- 4
How does a modal dialog return a value to the form that opened it?
Model answer
The dialog stores the value in one of its own fields, and the calling form reads that field through a getter once the show call returns.
- 5
Why can the calling form not read a modeless form's fields immediately after showing it?
Model answer
The show call returns at once for a modeless form, so the user has not yet entered anything and the fields still hold their starting values.
- 6
What is a shared data class, and why is one used across forms?
Model answer
A shared data class is a single object holding the application's working data, and every form reads and writes it so all the screens agree.
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 Multiple Forms and Linking to Files, 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.