This project requires you to investigate some of the designs of the standard API of the Java programming language. Some of the libraries are of well known features, such as the collection framework, while others are for new language features that are unique to Java. Part of the project is understanding what these features do, when are they useful and when they are not, and how they can be implemented.
Your best source of information is the Internet. See The Java J2SE Documentation, which has several tutorials and the Java API documentation which describes in detail all the classes you must learn.
The Java collection framework is in package java.util
.
Learn its classes, interfaces and exceptions, and answer the following
questions. Note that you don't need all of java.util
- the the
collection framework.
Build class diagrams describing the framework. | |
How would you extend the framework, to add new data structures or better implementations of existing ones? | |
Which design patterns are used in the framework? | |
Templates are considered to be added to the Java language in its next version. Describe the effects of this change on the framework: How will the interface change, what new compiler checks it will enable, how it can affect performance and so forth. |
The collection framework is worth 30% of the exercise's grade. The rest of the grade is 10% for each of these seven language features:
Class
and Package
in package java.lang
,
and all of the java.lang.reflect
package (don't forget class Proxy
there and the subject of Dynamic
Proxy classes).Class
, ClassLoader
and Compiler
in package java.lang
.Runtime
, Thread
, Process
,
ThreadGroup
, ThreadLocal
and InheritableThreadLocal
in package java.lang
.java.lang.ref
.SecurityManager
and RuntimePermission
in package java.lang
, and all of the java.security
package.java.beans
and java.beancontext
.For each of these seven features, you must learn the set of classes, interfaces and exceptions that provide access to it, and then answer these questions:
What does this language feature do? What is it good for? | |
What support from Java compilers and the Java Virtual Machine is required to implement this feature? How expensive is the feature in terms of performance? | |
Is this feature easy to extend by a programmer? Does it use any design patterns? | |
For each class and interface you learned, shortly explain what it does. Give code samples for using the classes and interfaces, both by inheriting them (if possible), and by creating an object of existing classes. (This part requires most of the work on a language feature). |
Good luck!