Glossary


abstract class

A class that includes one or more methods declared as abstract ( methods that lack definitions). Abstract classes can't be instantiated; they must be subclassed. Those subclasses can then be instantiated . The idea is that a subclass or concrete class provides definitions for abstract methods. Note that abstract classes can implement methods, and you can call static methods of an abstract class.



ActionListener

This interface, which defines an actionPerformed(ActionEvent e) method, is often used in Swing-based GUI applications that handle the events generated when a user clicks a button or types in a text box.



algorithm

Algorithms are small Java procedures that solve recurring problems. An algorithm is like a cooking recipe in which the general steps are stated, but the minor details are omitted.



anonymous class

This class, called "anonymous" because it has no name , is just like a regular class except that it's embedded in a parent class and is declared and instantiated in one statement.



Ant

An open -source Java-based Make tool provided by Jakarta. Many developers and certification candidates use Ant to replace javac because it takes care of peripheral chores, such as creating directories, cleaning up after itself, and creating javadoc documents.



API (application programming interface)

The set of public methods a class or package makes available to other programs.



application

An application is a computer program designed for a specific task or purpose. For the SCJD certification, it's the Java program that satisfies the requirements of the certification instructions. It must run on Windows and Solaris equally well, so test it on both platforms.



archive

In the context of JAR files, an archive is the collection of all your project's files in one *.jar file. That is how you must submit your solution. Note that your archive does not have to be compressed. Web clients are packaged in Web Application Archives (WAR) files. A J2EE application with all its modules is delivered in an Enterprise Archive (EAR) file. Notice that WAR and EAR files are standard Java Archive (JAR) files with a .war or .ear extension.



ArgoUML

A free UML package, written in Java, that enables you to draw UML diagrams and then generate the skeleton code. Please see http://argouml.tigris.org/ for more details.



ASCII (American Standard Code of Information Interchange)

ASCII is a system for representing characters as numbers . Representing text with standardized ASCII codes simplifies interplatform data transfer.



assert

A new feature in J2SE 1.4, used to test a condition expected to be true . If that condition is false , it probably indicates a problem in your program. One cool feature is the ability to ignore asserts with a compiler flag. Asserts are inspired by Bertrand Meyer's Eiffel, a statically typed, object-oriented language.



asynchronous

The Internet handles many types of data transfer. In asynchronous applications, message packets can travel between computers without being required to arrive in the correct order. For example, TCP/IP takes care of reordering the packets after they all arrive and resending a packet if one gets lost. Notice that the Internet handles variations in packet transfer, but it's an overgeneralization to say that the "Internet" is asynchronous. It's the application that's synchronous or asynchronous.



atomic

A piece of data in your database is called "atomic" if it's not duplicated elsewhere.



AWT (Abstract Windowing Toolkit)

This toolkit is Sun's set of classes for writing platform-independent GUI code. Much of AWT uses the native GUI system, but Swing components enable you to maintain the same look and feel on many different platforms. Note that Swing, not AWT, should be used for the certification project.



binary

A numbering scheme based on the values 0 and 1. In the context of this exam, it's a file format in which data is encoded as a sequence of bits, not a sequence of text characters. The database file for this certification project is in binary format, not ASCII format.



break

This Java keyword causes program execution to stop in that particular block or to continue by jumping from the block tagged with break to the beginning of the next block. Contrast this behavior with that of the continue keyword.

See also [continue]


build

This process is synonymous with compiling. A build can be more than just compiling, however. It can include package and deploy code to certain directories. The certification project is just large enough to justify using Jakarta Ant to build it. Using Ant makes it easy to compile everything whenever needed.

See also [Ant]


catch

This Java keyword is used to "catch" exceptions. When that happens, execution jumps from the preceding try block to the catch block and the code in this block executes.

See also [finally]


checked exception

An exception that requires supplying explicit handling code for the compiler.

See also [unchecked exception]


classpath

This environment variable enables you to compile from any directory because the system tells the Java compiler where to look for imported class files.



coding conventions

A set of guidelines specifying how to format your code, especially where to break lines, how to use whitespace, and where to place the block brace . The evaluators expect to see you using Sun's preferences for coding conventions. Because the look of your code affects your score, adhere to Sun's preferences.



Collection

A Collection is a container object that holds multiple elements. It is used to contain data structures, such as HashMap and Set . The two places you are most likely to use a Collection are in the GUI ”for example, to track user seat requests , and to set up a locking mechanism to track database locks.



continue

Unlike the break keyword, the continue keyword causes program execution to jump from this keyword to the next innermost loop execution and start again. If you add a label, program execution will jump to that block or perhaps a few levels outward from the nested loop continue is in.

See also [break]


Controller

In the Model-View-Controller design pattern, the Controller is the mediator between user input (for example, view, GUI) and the model (the database).

See also [MVC (Model-View-Controller) pattern]


CVS (Concurrent Versions System)

CVS is a version control utility. Some candidates use this popular tool to track changes to the certification source code and make backup copies (http://www.cvshome.org).



daemon thread

A low-priority thread, such as the one the garbage collector uses; the Java Virtual Machine (JVM) exits when the only threads running are all daemon threads.



database server

A standalone computer program that holds and manages a set of data as a single system ”for example, when locating a requested record. Part of your certification project should enhance the database code supplied with the assignment download. With your changes, you will then have a database server that your program can talk to across a network connection.



deadlock

A situation in which two or more Thread objects are stuck because each thread holds a resource the other needs.

See also [thread]


Decorator pattern

This design pattern adds functionality by composition instead of by subclassing. If you extend the Sun-supplied classes, you will most likely use this pattern; for example, I used it to enhance the Sun-provided database classes.

See also [design pattern]


design pattern

A recurring solution to common problems. Design patterns are defined in a way that makes it easy for others to use the same solution. The SCJD certification requires that you use several patterns, including MVC and Value Object.

See also [MVC (Model-View-Controller) pattern]


deprecated

Any Java declaration, such as a class or method, that will not be updated in future releases and so should be avoided in new code. Sun has tagged many methods as deprecated, so you shouldn't use them because they will be removed in a future release. Your assignment download includes a few deprecated methods, and part of your grade is based on how you handle them.



DOM (Document Object Model)

DOM provides a language and platform-neutral interface for accessing and editing the style, structure, and content of documents.



error ( java.lang.Error )

An error occurs when something has interrupted the flow of execution and the JVM cannot recover, so the program ends. The java.lang.Error class, or one of its subclasses, is thrown when the JVM realizes it is about to crash. (This is different from exceptions, from which your application can recover.) At least you usually have a chance to crash gracefully.

See also [exception (java.lang.Exception)]


exception ( java.lang.Exception )

Sun defines an exception as "an event that occurs during the execution of a program that disrupts the normal flow of instructions." Checked exceptions are those you specify so that the JVM will look for them; they are declared in the method declaration or included in the try-catch construction. The java.lang.Exception class, or one of its subclasses, is thrown when an error happens, but not an error severe enough to crash the JVM. The try-catch block was designed with exceptions in mind. Runtime exceptions are not thrown because the runtime system detects them; they include arithmetic exceptions (such as dividing by zero), pointer exceptions (for example, accessing an object through a null reference), and indexing exceptions (such as accessing an array element that doesn't exist). The designers of the Java language felt that because runtime exceptions can happen anywhere , attempting to catch them wasn't worth the extra effort, as it would mean writing too many try-catch blocks.

See also [error (java.lang.Error)]


Extreme Programming

A software development methodology, best suited for small projects, that emphasizes iteration, speed, and more customer involvement. It includes features such as pair programming, minimum documentation, emphasis on testing, and more. For more information, see http://www. xprogramming .org.

See also [RUP (Rational Unified Process)]
See also [waterfall methodology]


finally

The finally clause runs after all other try-catch processing is completed, whether or not an exception is thrown or a break or continue are issued. However, if a catch clause calls System.exit() , the finally clause is ignored. Because the finally block in a try-catch-finally statement is guaranteed to run, it is used for cleanup chores, such as database connection termination.

See also [catch]


FlowLayout

This easy-to-use Swing layout manager arranges subcomponents in rows.

See also [layout manager]
See also [Swing]


GridBagLayout

This is the most powerful layout manager in Swing and gives you the most control over placement of subcomponents. You can do control margins, set justification to one side or corner of a cell , and more.

See also [layout manager]
See also [Swing]


GUI (graphical user interface)

The GUI is the visible window, with items such as buttons and menus , presented to the user. It accounts for a big part of your score, so make sure to put some thought into how you design your project's windowing scheme.



HTML (Hypertext Markup Language)

HTML is the markup language that determines how a browser renders a Web page. It is defined and maintained by the World Wide Web Consortium (W3C). See http://www.w3.org/TR/xhtml1 for information on XHTML and http://www.w3.org/TR/html4 for the latest HTML standard. Remember, you must provide a user help file in HTML for your certification project.



IDE (Integrated Development Environment)

The IDE is the software development tool that helps developers write language code. Whether you use one to build your project is not important, as long as no vendor-dependent libraries are added. The Sun evaluator will fail you if these rogue libraries are part of your source code.



interface

An interface defines a new reference type with members that are classes, interfaces, constants, and abstract methods (that is, the methods have no implementations ). You will likely need to include at least one interface with your certification project. Remember, an interface has no detailed implementation of methods; it is just a list of method signatures. I used an interface in the Remote Method Invocation (RMI) portion of my project so that the GUI didn't know, or care, where the data came from. That means there was no local/remote-specific code in my GUI, which improved the design.



interrupted

A thread interruption occurs when a thread in a sleep or wait state is activated again.



InterruptedException

InterruptedException is a class that is thrown when a thread is interrupted, causing the class to handle the exception. An appropriate catch block must be available for this to function.



J2EE (Java 2 Enterprise Edition)

The collection of Java standard library classes plus extensions designed for supporting multitier Web applications. Note that J2EE is a superset of J2SE.



J2ME (Java 2 Micro Edition)

Sun's collection of Java classes designed to support applications that run on relatively small systems, such as cell phones and Palm Pilots.



J2SE (Java 2 Standard Edition)

The acronym J2SE stands for the Java 2 Platform, Standard Edition. It's the Java edition you use for developing your certification project.



Jakarta

This project managed by the Apache Software Foundation produces many excellent , open source, Java-based products for developers. Some current Java projects are Alexandria, Ant, Cactus, Struts, and Tomcat. See http://jakarta.apache.org for more information.



JAR (Java Archive)

A collection of application files and resources combined into a single file. Your solution must be bundled in one JAR file.

See also [archive]


javadoc

This Sun-provided utility automatically generates documentation of your classes from your source code comments. You are graded on how well your source code is commented in the correct format, and javadoc can process your code comments into Web pages of documentation.



JAXP (Java API for XML Processing)

This API specification from Sun for XML libraries is now included in J2SE 1.4.



JDK (Java Development Kit)
See [SDK (Software Development Kit)]
JEditorPane

This Swing component can be used to render HTML or RTF (Rich Text Format). Using it is simpler than the Sun documentation suggests. You don't need to get involved with document structure. You can simply feed raw HTML text to JEditorPane. If you don't embed the JEditorPane component in a ScrollPane, however, I've noticed the screen display twitches (a minor annoyance up to J2SE 1.4, but it will no doubt be fixed in a later version).



JFC (Java Foundation Classes)

A set of Java class libraries used for building the graphical user interface (GUI). The current version in J2SE is commonly called Swing.

See also [Swing]


JUnit

This testing utility provides a framework for writing and running automated tests.



JVM (Java Virtual Machine)

An abstract computing machine that has an instruction set and uses various memory areas responsible for Java's cross-platform delivery, the small size of its compiled code, and its ability to protect users from malicious programs. This part of the Java Runtime Environment interprets Java bytecode and connects your program to system resources.



layout manager

This Java feature enables you to fine-tune the size and position of components in your GUI. There are several types of layout managers, such as FlowLayout and GridBagLayout, used for Swing-based GUIs.

See also [Swing]


Listener

This object enables you to "listen" to user input. If an object is registered as a listener, a certain method is called whenever the associated event occurs. The target is the component to which the listener is attached. This is how you respond to, for example, user mouse clicks.



logging

This process captures information from an application and records it in a file. Logging is optional. Normally, it is an excellent way to help debug your applications. If you use logging in your certification project, however, avoid confusing the evaluator with this extra functionality and remove logging features before submitting your project.



manifest

A file (added to a JAR file) containing information about other files in a JAR.

See also [JAR (Java Archive)]


Model

In the Model-View-Controller design pattern, the Model portion acts as the data store or database.

See also [MVC (Model-View-Controller) pattern]


multithreading

Multithreading occurs when more than one thread is spawned simultaneously by a program. Part of your certification assignment requires designing your project to handle multiple simultaneous users, so your application will have several independent paths of execution.



MVC (Model-View-Controller) pattern

The MVC pattern partitions an application, or even just a piece of it, into three parts : the Model, the View, and the Controller. The MVC pattern is used by Swing.

See also [Controller]
See also [Model]
See also [View]


notify

This method in the Object class allows a waiting thread to become runnable. The JVM scheduling mechanism decides, unpredictably, when that next thread will run.



notifyAll

A method of the Object class that wakes up all threads waiting on the object in question. When this happens, the newly awakened threads compete for the lock on that object. When one of those threads gets a lock on the object, the others go back to waiting. Compare how notifyAll wakes up all threads with the Object class's notify method, which arbitrarily wakes up only one of the threads waiting on this object. This method is just like the notify method, except that all waiting threads become runnable.



Observable

This class in the java.util package has methods for adding and notifying objects in the Observer-Observable design pattern. The Observable class is the one that contains data; the Observer class is the one waiting for an event.



Observer

This object expects to be notified when an event it has registered for happens. Note that Observable and Observer are interfaces that any class can implement. Your application's GUI, based on Swing's event model, will use the Observer-Observable design pattern.



overloading

Declaring two or more methods with the same name but different signatures. Your solution can overload some of the database methods that have the same name, but the parameter lists are different.



overriding

Declaring a method in a subclass with the same signature of a method in the superclass. If you subclass the Sun-supplied classes instead of modifying them, you might want to override deprecated methods in the supplied classes with methods in your subclass.



package

A set of classes that share the same file directory, which allows for a naming system (a prefix for classes) to help prevent name conflicts. Programs are organized as sets of packages. You must organize your project's classes into a clear structure so that the evaluator can easily see what you are doing.



priority

This numeric value from 1 to 10 dictates in what order Java services threads. You can change a thread's priority value.



regular expression

A powerful syntax for searching for and replacing patterns within strings. New to J2SE 1.4, you can now search or tokenize, for example, search criteria with a string pattern based on Perl regexes. A regular expression is one of more powerful features that have been added to Java.



RMI (Remote Method Invocation)

A system that allows one class to call methods of another class when the classes are distributed over a network. The remote Java object can be on another JVM and even on a different host. You can implement your network requirement with RMI, which enables the database server portion of your application to communicate with the client portion. Your client calls methods on your remote database server ”for example, to perform a search ”and receives the result to display in a JTable component.

See also [socket]


RUP (Rational Unified Process)

This software development methodology is a flexible software development process platform characterized by frequent iteration, in which you can repeat steps often to incrementally complete work.

See also [Extreme Programming]
See also [waterfall methodology]


SAX (Simple API for XML)

This standard is one of the first widely adopted standards for parsing XML files; it performs event-driven parsing of XML files.



SDK (Software Development Kit)

This toolkit (which you can download from Sun) contains all the developer utilities, libraries, and documentation you need to develop your certification project. Sun used to call it the Java Development Kit (JDK).



serialization

Object serialization encodes objects into a stream of bytes and the reverse ”reconstructing the object from the stream. Serialization persists for communication via sockets or RMI. Whether you use RMI or sockets, you will probably serialize the object containing the results of a database search so that the object can be sent from the server to the client.



socket

A single socket is one endpoint of a two-way communication link between two programs running on the network. Sockets enable you to send raw streams of bytes back and forth between your client and server. If you don't use RMI, you will use sockets for your application's network functionality.

See also [RMI (Remote Method Invocation)]


StringTokenizer

This class enables you to parse strings easily fashioned by breaking strings along delimiters. I used this class to parse the criteria string in my solution because it was the easiest way to do so. Regular expressions are actually a more powerful approach, but some candidates go the easy route and use StringTokenizer .

See also [regular expression]


subclass

If you extend the Sun-provided classes, the new classes are called subclasses of the original class.



superclass

The parent class of another class, which can inherit methods and fields from the superclass. If you extend the Sun-provided classes, the new classes are called subclasses of the original class, which is called the superclass.



Swing

Swing replaced AWT as Java's UI component library and added more graphics capabilities to J2SE. These new features include better text boxes, new ways to group components on panes, new grid tables, and more. Your solution must use Sun's Swing components, which replace the older AWT components. In particular, you must include the JTable grid class. In your project, you'll probably use a dozen Swing components in all.

See also [AWT (Abstract Windowing Toolkit)]


synchronized

Threads are said to be synchronized when only one thread at a time can access a method or block; it is guaranteed to be thread safe. This Java keyword causes the JVM monitor to prevent two simultaneous threads from running a block of code. In your certification project, you must provide functionality that can handle simultaneous users. Note that some methods in the code you download from Sun are synchronized.



TCP/IP (Transmission Control Protocol/Internet Protocol)

The Internet uses this protocol to transfer packets. If you place your user help file on the Internet (that is, if you don't include it in your JAR file), your application will use TCP/IP to retrieve it. TCP/IP also has implications for addressing and routing. To retrieve your project's HTML help file, you use HTTP, a protocol that runs on top of TCP/IP.



thread

A thread is a single sequence of program execution. When a program runs, one or more threads are created. When the threads die, your program stops running. The java.lang.Thread class is the way Java encapsulates one thread in the JVM.



Throwable (java.lang.Throwable)

The superclass of all errors and exceptions in the Java language. Error and Exception , two subclasses of Throwable , indicate an interruption to normal program execution.



try

A try statement executes a block of code in which, if an exception or error is thrown, control jumps to the first catch clause declared with the same type as the error or exception.

See also [catch]
See also [finally]


UML (Universal Modeling Language)

A language for specifying, visualizing, and documenting software artifacts. I encourage you to use UML when designing your solution. Also, when you write the design choices document, you can include UML diagrams as part of a Microsoft Word document.



unchecked exception

Exceptions that occur within the Java runtime system and are not checked by the compiler where these exceptions are caught or specified. These exceptions include arithmetic exceptions, pointer exceptions, and indexing exceptions.

See also [checked exception]


user thread

Any thread that is not a daemon thread. Your solution must handle user threads directly; the JVM handles daemon threads.

See also [daemon thread]


View

This portion of the MVC design pattern is the GUI of your project. The View portion passes user input to the Controller portion. Swing technology already uses the MVC pattern, so be mindful of how you design the View portion.

See also [Controller]
See also [Model]
See also [MVC (Model-View-Controller) pattern]


wait

This method in the Object class causes a thread to become inactive and be added to the list of threads waiting for access to that object.



waterfall methodology

This methodology describes the classic approach of building software, including definition (for example, defining requirements), design, implementation, and maintenance phases.

See also [Extreme Programming]
See also [RUP (Rational Unified Process)]


XML (Extensible Markup Language)

A collection of tags like HTML (a single, predefined markup language). However, XML is more flexible and often used as a metalanguage when it describes another language. This language, although surprisingly simple in its structure, gets its power from widespread adoption. It is a W3C-proposed recommendation based on Standard Generalized Markup Language (SGML). This book explains one use of XML for your configuration file, if you choose to implement one.





JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net