NEW
Font size
WorksheetsZZTECHZZ
Total questions: 57
Worksheet time: 29mins
Which type of relation in the class diagram affects between classes (and not their instances)?
Inheritance
Association
Dependency
Composition
How can you achieve if there are many classes in a class diagram to make their relationship cleared?
We do not indicate the properties of the relationships (multiplicity, role name, etc.)
We split up the diagram.
By omitting the details (attributes, operations).
We print the diagram in a smaller size.
When do we list a method in a derived class, if a method of the same name exists in the parent class?
Always.
If we declare or override it in the derived class.
Only in case of method overriding.
If the method does an important activity (not setter / getter, etc.)
When is the method of the parent class visible in the derived class?
Always.
Only, if it is public.
If we refer to it with the super keyword.
If it is public or protected.
What is true about the dependency relation?
Weak association.
The dependent object cannot create an instance of the class that generates the dependency.
Strong association.
No answer text provided.
Which statement is false about generalization?
Java allows multiple generalizations, if we do not implement more than one interface.
Java does not allow multiple generalization.
Generalization is the opposite of specialization.
In Java, we express it with the keyword extends.
What can be a generic parameter in Java?
Classes that implement the methods used by the generic.
Any type.
Any type that implements the methods used by the generic.
Classes.
Which is considered an abstraction method?
Both.
Usage of abstract methods.
Usage of generic classes.
None of these.
Can a generic class have an abstract method?
No.
Yes.
Can an abstract class have a generic method?
Yes.
No.
Which statement is false?
The collection groups any amount of data.
The type of data stored in the collection is the same.
In case of primitive types, we can instantiate the collection with the wrapper class of the primitive type.
Arrays are not collections.
What data members can a static method use within its own class?
Members, that have getters
Static members
All members
Static and public members
What can't we use a static attribute for?
For object attributes
To define flags
To define constant values
For values shared by objects in the class
What types of exceptions must be caught or indicated?
None of the exceptions should be caught or indicated
Exception and RuntimeException
RuntimeException
Exception
How can we define a custom exception?
We create an enum which contains the types of errors
We create a simple class
We cannot do that
We derive our exception type from class Exception
Which statement is false about the serialization implemented by Java Serializable?
We can take a snapshot of the objects with it.
Serialization saves both the state and relationships of an object and can deserialize them automatically.
A typical tool to realize Remote Method Invokation (RMI).
We can create a binary representation of the object.
What is the super class of the Swing controls?
JObject
JFrame
JControl
JComponent
Which class represents the window in the Swing environment?
JFrame
JWindow
JPanel
JDialog
Which method is used to define the behavior, that takes effect when we close the window?
enableExitOnClose(...)
setAutoClose(...)
setDefaultCloseOperation(...)
setCloseBehavior(...)
Which pairs can be used to handle window events?
addWindowListener method - WindowEvents implementation
addWindowEvents method - WindowAdapter implementation
addWindowEvents method - WindowEvents implementation
addWindowListener method - WindowAdapter implementation
Which statement is true? The window icon file ...
...should be placed inside of the project folder always.
...can be loaded both from the JAR of the program and from the file system the same way.
...loading can be guaranteed to work always, if we place it in the JAR of the program.
...could only be a bmp or ico file.
Which method can be used to add a mouse click handler to a Swing component?
addMouseListener
addMouseWheelListener
addMouseClickListener
addMouseMotionListener
What should we do if we need to handle multiple types of mouse events?
We implement the MouseListener, MouseMotionListener, MouseWheelListener interfaces separately one by one.
We create a class that implements all three interfaces (MouseListener, MouseMotionListener, MouseWheelListener).
We need to add a separate interface implementation for each event.
We derive an event handler class from the MouseAdapter.
What is the basic idea of programs that use event handlers?
While the program is running, certain activities are done as a result of events.
The event object must be defined by the event handler.
Errors are processed as events.
We can respond to mouse clicks in separate functions.
Which statement is false about the event object?
It has a reference to where the event occurred.
The source attribute that contains the source of the event always points to a real object.
Carries the properties of the event.
An appropriate event class can be created for similar types of events.
Which statement is false? The event handler function...
...receives as a parameter the triggered event to which it is currently responding.
...contains the activity to be performed in response to that event.
...used only to handle graphic event events.
...can trigger other events while it is running.
Which statement is true?
The ButtonGroup is used to change the style of the assigned Buttons consistently.
No more than one RadioButton can be selected in a JFrame at a time.
ButtonGroup shows the RadioButtons in a visual frame.
RadioButtons are in mutual exclusion when they are assigned to a ButtonGroup.
The NetBeans designer collects the initialization of visual elements in the following method...
initComponents
initApplication
initControls
initializeComponents
The implementation of the event handler code of a button click can be found in the following interface
ActionListener
ButtonClickListener
EventClickListener
ActionHandler
Which method of ActionListener should be implemented when we handle a button event?
onEvent
handleClick
onClick
actionPerformed
What is true about the JList control?
JList stores the data, that has to be showned.
The default model for JList is DefaultContainerModel.
The type of data stored in the JList model is String.
In the JList control, the selection of an element can be detected via the valueChanged event.
Which method of JTextField can be used to get the edited text?
getText
getContent
setText
setContent
Which interface should be implemented if we want to be notified of a change in the value of the Slider?
ChangeListener
ValueChangedListener
StateChangeListener
ScrollListener
Which method is used to obtain the content of a BufferedImage to draw on it?
getContent
getGraphics
getBitmap
getImage
In which method can we redefine the drawing of a Swing UI component?
paintComponent
drawComponent
paint
draw
Which method of Graphics2D can we use to draw? (Which one is an existing method?)
drawPie
fillRectangle
drawRoundRect
clearRectange
Which statement is part of the Data Query Language?
SELECT * FROM table
UPDATE table SET ...
CREATE TABLE tablename(...)
INSERT INTO table (...) VALUES (...)
What is the Connection rollback () method used for?
Undoes database changes made since the connection was established.
Revokes a user's access rights.
Undoes the last transaction that was started but not yet committed.
Cancels the last issued change request.
Which method call is incorrect on the rs variable of type ResultSet?
rs.getString(5);
rs.getInt(2);
rs.getInt(0);
rs.getString("ADDR");
What do we call as Dirty Read?
Reading non committed data.
Reading data stored in the wrong format.
We are requesting too much data from the database manager.
Reading finalized data.
What is true about a good database?
Ensures data integrity.
All columns in each table are indexed.
May contain redundancy.
Keys can only consist of a single field.
What type does JPasswordField use to store data?
byte[]
char[]
String Character[]
String
Which statement is true about JTable?
The table has a data object that implements the TableModel interface.
The data is stored in the JTable.
There is no default (abstract) implementation of TableModel.
The fireTableStructureChanged method only invalidates the table structure.
Which methods of TableModel need to be implemented for minimal operation?
getValueAt
getColumnName, getValueAt, getColumnClass
getRowCount, getColumnCount, getValueAt
getValueAt, getColumnName
To display the JTable, the Cell renderer uses the following type - display pair.
Number - TextField
Boolean - CheckBox
Date - DatePicker
ImageIcon, Icon - PictureBox
Which statement is NOT TRUE about the condition?
The state has an identifier so it can be distinguished from the others.
The state of the object can be described by the specific values of the attributes.
The state persists as long as the values of the attributes of the objects satisfy the invariant assigned to the state.
The termination of a state can occur suddenly by itself.
Which statement is FALSE?
When the object terminates, the object enters an out-of-system termination state.
When the object expires, the state of the object is simply cleared.
The termination of the state occurs as a result of an event.
When the state of the object terminates, the object enters another state.
Which statement is true about the state diagram?
The nodes of the state diagram graph are events, the edges are state transitions.
The state diagram can contain several initial states.
A state diagram is a singly connected directed graph.
A state diagram is an undirected graph.
The complexity of the state diagram can be reduced by the following method(s):
Generalization and aggregation of states.
Aggregation of states.
No way.
Generalization of states.
Which statement is true?
The invariant of the aggregated and generalized states are the same.
The invariant of the aggregated state is the disjunction of state invariants of the sub-states.
The invariant of the generalized state is the disjunction of state invariants of the sub-states.
The invariant of the generalized state is the conjunction of state invariants of the sub-states.
How do we mark the rendezvous point on a flowchart like activity diagram?
With a horizontal dashed line
With a rectangle with rounded corners
With a horizontal solid line
With a diamond
In the collaboration diagram, between which objects does the collaboration take place?
Whose life cycle is interconnected.
Instantized by the same object.
Which are connected by an association.
Which are instances of the same class.
Which diagram can be considered as an extension of the collaboration diagram?
Object diagram
Class diagram
Package diagram
Component diagram
How do we mark the argument passed in the collaboration diagram during message sending?
With the envelope icon on the association.
With a small arrow starts from a circle.
With the message ID associated with the association.
With the arrow pointing from the sender to the recipient.
How do we mark on a collaboration diagram if a message has multiple recipients?
With several arrows indicated on the association.
The recipients are indicated by three rectangles that are shifted relative to each other.
With multiplicity.
We do not have the opportunity to do that.
Which is NOT a part of the user case diagram?
Users
User accounts
Usage relations
User cases
How do we mark the user case on the user case diagram?
With a circle
By making the name of the use case underlined
With an ellipse
With a rectangle
