Skip to Content
Design Patterns Explained: A New Perspective on Object-Oriented Design
book

Design Patterns Explained: A New Perspective on Object-Oriented Design

by Alan Shalloway, James R. Trott
July 2001
Beginner to intermediate
368 pages
6h 52m
English
Addison-Wesley Professional
Content preview from Design Patterns Explained: A New Perspective on Object-Oriented Design

Case Study in Variation: An International E-Tail System

Suppose an e-tail system must process sales orders in several different nations. Initially I have to handle just the United States and Canada. I look at my requirements and see several things that vary. I note these in Table 20-1.

Table 20-1. Different Cases Depending Upon Residence of Customer
Case Procedure
U.S.A
  • Calculate freight based on UPS charges.

  • Use U.S. postal rules for verifying addresses.

  • Calculate tax based on sales and/or services depending upon locale.

  • Handle money in U.S. $.

Canada
  • Calculate freight based on main Canadian shipper.

  • Use Canadian postal rules for verifying addresses.

  • Calculate tax based on sales and/or services depending upon Canadian province taxing rules (using ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition

Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition

Alan Shalloway, James R. Trott
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 0201715945Purchase book