Archive for March, 2009

Point Of Sale (OOAD)

March 12, 2009

Problem domain of a POS (Point Of Sale) system:

Register is a class that records all payments. This is an initial domain object to the entire POS application from the User Interface. The User Interface is a Java Swing based application.

The Register handles all system operations including the following from the POS terminal and interacts with the other domain objects.

makeNewSale
processSale
enterItem
makePayment
endSale etc.

Register class contains ProductCatalog.

Sale is a class encapsulates sale information like list of Sale line items etc.

SaleLineItem is a class encapsulates ItemId, quantity etc.

ProductSpecification class encapsulates ItemId, description, price etc.

ProductCatalog class has all ProductSpecification objects

Payment class encapsulates cashTendered etc.

SaleJFrame is a JFrame representing a window displaying the sale line items and the running total.

Tax Calculators:

We need to pay taxes to government based on the Sale amount and type of SaleLineItems, etc and tax rules are complicated.
There are many tax calculators available in the market namely GoodTaxCalculator, QuickTaxCalculator and AccurateTaxCalculator.
Each Tax calculator has a different interface. The POS application needs to support these calculators and future products as well.

Pricing Rules:

There are varying pricing rules for a Sale can vary. During one period it may be 10% off all sales, later it may be $10 off if the Sale total is greater than $200 and many other variations. POS should be designed for these varying pricing rules.

Object Design Principles

March 11, 2009

Information Expert
Low Coupling
High Cohesion
Liskov’s substitution principle
Open closed
Indirection
Creator

Hello world!

March 11, 2009

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!