You may prepare a single, 8.5 by 11 inch page that you can use in taking the exam Wednesday, 8 November.
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
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. (The paper online has been corrected since I gave you a paper copy.) 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.
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
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
?
The purpose of this discussion is for you to be able to understand the UML class diagrams. You should be able to draw simple class diagrams giving inheritance, aggregation, and association relationships among classes. You should know the three main parts of the class diagram, but do not have to worry about the details of accessibility markers and such.
What is a pattern? What are the three main components of a pattern description? What are the three main kinds of patterns? What are some examples of each (not just the ones listed in this handout)? How do you go about using patterns in design? (The latter point ties this handout to the Designing Patterns handout).
What is this pattern all about? When is this pattern applicable and when not? What are the various kinds of components? What is meant by active and passive filters? How do you go about implementing the pipes and filters pattern?
What is the basic idea of each of the architectural patterns -- including the process control patterns? When is each applicable and when not?
You should know the basic purpose of each pattern we talked about.
The purpose of discussion of this paper was to show a framework design under development. It sketches how patterns can be used in the design -- such as layered architecture, template method, and strategy.
The purpose of discussion of this paper was to fit together a several of the patterns and illustrate how you might go about designing real systems with them. It should also provide some further explanation of some of the patterns.
You should understand well how to build abstract data types in Java as you did on the bingo program.
You should also understand how to build simple frameworks using template method and strategy patterns as we did on the second homework.
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?