This is a study guide I am providing to assist you in your study for the exam. However, I reserve the right to ask questions on any material that we have covered this semester -- unless I say explicitly that it will not be on the exam.
The key point of including this case study is to give a more sophisticated example of an ADT design/implementation using Java. The case study uses: Java interfaces to separate specification from implementation, Java exceptions, Javadoc annotations, iterators, an assertion checking mechanism, Java packages
Improvement notes: use Java Iterator
instead of
Enumeration
, use inner classes to implement iterator
Variant paper: H. C. Cunningham and J. Wang. "Applying Software Patterns in the Design of a Table Framework,", To appear in the Proceedings of the Conference on Applied Research in Data Engineering, Acxiom Data Engineering Laboratory, University of Arkansas at Little Rock, November 2001.
What I wanted to illustrate when we talked about this paper was the use of design contracts (pre- and postconditions, invariants) as a means for being careful in the design. I also wanted to show an approach to building a data/file structure that separated concerns such as the access mechanisms from the storage mechanisms.
Since we have now studied patterns, you will notice that this paper uses the Layered Architecture, Bridge, Proxy, and Iterator patterns.
This paper also introduces the concept of framework.
We did not discuss this paper, but it is another good resource on design by contract.
This handout looked briefly at the difference between overriding by replacement and refinement in OOP languages.
The purpose of this handout is to discuss the differences between inheritance and composition (or aggregation) as reuse mechanisms. How do you do each of these in Java? advantages and disadvantages of each?
The purpose of this handout is to discuss other programming language issues that are affected by the choice to include inheritance: polymorphic variables, storage allocation/deallocation issues, copy versus reference semantics, copy creation, equality testing
This handout looked briefly at issues related to multiple inheritence in programming languages.
The purpose of this handout is to discuss the polymorphism and its various forms in programming languages: polymorphic variables, overloading, overriding, deferred methods, pure polymorphism, and generics. What does Java have and not have?
The purpose of this handout is to discuss the meta-class structure of
Java. That is the class Class
and the association of its
instances with classes in Java. What facilities are provided by
Class
?
In this lecture I discussed the primary features of the UML class diagram.
You should understand well how to build abstract data types in Java as you did oin the first assignement.
You should understand how inheritance and polymorphism work in Java. I am likely to give you a set of classes using inheritance and overriding and ask you to answer questions about them. In particular, I might ask you to show the output of a program that uses inheritance and polymorphism. Give the class diagrams. Show which mutators are accessors, mutators, etc. Maybe I will ask you to add a new class that does something useful (: or maybe does something useless :).
UP to ENGR 691 root document?