The exam is in the same room as it has been all semester (as per the syllabus); the announcement below was an incompletely edited cut-and-paste job. It lies.
For what it's worth, I loathe double-spaced papers—quad-spaced is the only way to do it. But seriously: I like single-spaced, 12pt. font.
> thinking about using and XML-based markup That's fine... but seriously: WHY? Because it's trendy? Or do you have a GOOD reason for wanting to use it? XML: When to use it and when not to use it Soapbox: Humans should not have to grok XML (Answers to the question "When shouldn't you use XML?")
For those of you unable to attend class last wednesday, here are the lecture 39 notes.
Design a level editor for an action/RPG-oriented game engine.
FYI: what it means to be first class.
Answer these questions (be sure to justify your responses!) based on this diagram from lecture...

Microsoft's annual College Puzzle Challenge will be held on Saturday, November 6th. Team registration is open. It's a fun event, hosted by Gator grads!
Be prepared to explain what happens when the preorder iterator code from the text is hand executed today in class. You will be called on.
Apparently Oracle is incompetent: while they are still maintaining an index to the old JDC Tech Tips, the links no longer work. However, the good old Wayback Machine comes through again... Using the Varargs Language Feature and Covariant Parameter Types.
Write the code necessary to maintain the invariant that a Component has-a parent when added to a Composite structure and lacks a parent when removed from the structure. i.e., "If I think you are my child, you think I am your parent." Hint: use one of the patterns we've already discussed
Implement at least:
All classes shall have a toString() that recursively prints a PREorder traversal [self first, then kids]
A simple example
lc = new LinkedComposite( new Leaf( "A" ), new Leaf( "B" ) ); ac = new ArrayComposite( new Leaf( "C" ), lc, new Leaf( "D" ) ); ac.toString();
Would output (note the indentation)
ArrayComposite containing
Leaf C
LinkedComposite containing
Leaf A
Leaf B
Leaf D
In case you weren't ware of this bit of magic... Using the Varargs Language Feature and Covariant Parameter Types. And yes you do need to implement add()/remove().
As you know, arrays have a fixed size while linked lists do not. By that logic, an array based Composite may have up to, but no more than its maximum number of children (which would be defined when it is created).
For the HW, you are to write your own linked list class!
FYI: I curently can read, but not reply to email. I've spoken to the sysadmins and hope to have the situation fixed sometime tomorrow.
Please bring at least one blue pen or black pen with which to record your answers on today's and future exams. The requirement, of course, refers only to the exterior of the pen: its ink must be some shade of invisible-except-under-UV-light. ;)
The exam dates are now confirmed. The syllabus has been updated with locations and times.
Implement a base class Magnitude; instance can be compared to each other. It shall, support the comparison operations:
lessThan( m:Magnitude ): boollessThanEqualTo( m:Magnitude ): boolequalTo( m:Magnitude ): boolgreaterThanEqualTo( m:Magnitude ): boolgreaterThan( m:Magnitude ): boolnotEqual( m:Magnitude ): boolNote: don't add any other methods to the base class Magnitude; they aren't necessary and probably will defeat the purpose of the assignment.
To prove the correctness of your implementation, you shall implement
two subclasses [the only operation that
your subclasses are allowed to override is lessThan()]:
Currency — represents moneyCartPoint — represents points on the Cartesian plane
and driver programs to make it all go. Deliverables: standard stuff + source + output.
Note 2: Magnitude is meant to implement an inheritable functionality, NOT a define a type (with multiple implementations). The methods are meant to compare magnitudes of the same class: comparing CartPoint to Currency is nonsense.
As you may know, the sort() method from Java's
Collections class — which takes an appropriate
Comparator object for the type of data in the collection
— performs a merge sort. The Java Design Patterns
Workbook claims that because one step of the merge sort
algorithm is being customized using a Comparator, that it
is an example of Template Method. What do you think?
Justify your answer. [200,400] words.
Riehle & Züllighoven's Understanding and Using Patterns in Software Development
Welcome to Design Patterns in Object-Oriented Programming! Be sure to check this page at least once a day so you don't miss any important announcements.
The mandatory biosketch assignment is due at the start of lecture on Friday 8/27. If you've written one previously, you can simply resubmit it with an updated “why you are taking this course” section, or even better, take the opportunity to tell me something new about yourself. (Should you be interested in such things, Dave: fact or fiction? is available for your reading pleasure.)