|
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
At Amazin'.com, you can order books and other goods. When you check out, an order is created. Think of how the web page has you type in these various pieces of info:
We have already seen a class Date. What would class Address look like? (Define its fields, and sketch the constructor and write one getter.)
task: Write canCombine. Two orders can be combined if they have the same receipient (up to title), and the same destination address, and the order-placed date is before the ship-date of another.
How should we tell when two OrderInfos are the exact same order?
Here is part of one possible solution.
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
©2008, Ian Barland, Radford University Last modified 2008.Mar.21 (Fri) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |