By the time of Exam 2, you should have a working knowledge of the following topics:

UML

bullet

Draw a UML class diagram illustrating the relationships between two or more classes, using the appropriate connectors indicating generalization, realization, exclusive composition, shared aggregation, dependency, association, and nesting.

bullet

Indicate multiplicity in composition, aggregation, and association relationships.

Inheritance and Polymorphism

bulletExplain what it means for a class to implement an interface
bulletUse the protected modifier in defining an inheritance hierarchy
bulletDescribe when to use an abstract class
bulletExplain the concept of the Java interface
bulletCreate an abstract method; describe the purpose of abstract methods
bulletDescribe the differences between an abstract class and an interface
bulletExplain the number of classes that a class can extend, vs the number of interfaces that a class can implement
bulletExplain what elements can be declared within an interface
bulletExplain what it means for a method to be declared abstract
bulletExplain that all classed inherit methods of the Object class, including equals() and toString()
bulletImplement overridden versions of the equals() and toString() methods
bulletImplement the Comparable<T> interface on a class to enable it to be sorted when instances of that class are added to a collection such as an ArrayList<T>

Event-Driven Programming

bulletList the two types of objects required for event driven programming in Java
bulletExplain the role of "event source" objects and give examples of two classes whose instances are "event source" objects
bulletExplain the role of "event listener" objects and give examples of two classes whose instances are "event listener" objects
bulletCreate an inner class that implements ActionListener to serve as an event listener for ActionEvents generated by event sources such as JButtons
bulletSubscribe the ActionEvents generated by a event source such as a JButton to be listened to by an event listener
bulletDefine the action command string for an event source
bulletDesign and implement event handling methods to handle multiple Action Events
bulletImplement code to handle an action event from the JButton or JTextField Java Swing classes
bulletExplain the purpose of the argument passed to the actionPerformed() method
bulletDesign and implement an ActionListener class
bulletDetermine an event source from within an actionPerformed() method
bulletDetermine the specific object that initiated an Action Event
bulletDescribe at least two different ways of structuring ActionListener classes and discuss advantages and disadvantages of each
bulletDescribe the differences between an inner class and a regular (non-inner) class
bulletMake use of inner classes to implement ActionListener classes

GUI Components

bulletIdentify two ways to position GUI components on the content pane of a JFrame object
bulletModify the content pane of a JFrame object, such as setting the background color, setting the layout, and adding components
bulletModify the basic properties of a JFrame, such as setting the title, size, visibility...
bulletDesign and implement a graphical user interface (GUI) programs using the JLabel, JPanel, JButton, and JTextField classes from the Java Swing package
bulletDifferentiate between layout managers such as: FlowLayout, BorderLayout and GridLayout
bulletUse the layout managers listed above to arrange components on a content pane

Exception Handling

bulletExplain how exception handling increases the robustness of software
bulletDefine exception; explain the concepts of catch and throw as they relate to exceptions
bulletExplain why Error exceptions should not be caught in application code
bulletFor a given program and input condition, determine the control flow of a try-catch block
bulletImplement a method that catches an exception thrown by a class in the Java Standard Library
bulletImplement a method that uses a try-catch block and a repetition statement (i.e., loop) to validate user input
bulletDistinguish between checked and unchecked exceptions
bulletExplain the concept of exception propagation; explain the outcome if an exception is thrown and not caught by the program
bulletExplain the consequences of not handling a checked exception within a method where the checked exception occurs
bulletUse multiple catch blocks to customize the way different types of exceptions are handled
bulletInspect a call stack trace displayed by an unhandled exception to determine what caused the exception to be thrown
bulletUse the throws clause to postpone when a checked exception is handled