Home > Patterns and Practices > A small design problem

A small design problem

I wanted to write about Object Oriented Analysis and Design in the context a small but real world problem. I wanted to mainly cover
 
  • Class Identification
  • Responsibility Assignment (I’ll probably touch upon this, may be revisit this later)
  • Apply design principles and patterns
Prakash helped me to identify the problem. We are frequent visitors to a book shop in Jayanagar, Bangalore. We decided to build our solution based on the business rules they have for selling books. Here is the mail from Prakash having the problem statement.
 
—–Original Message—–
From: Prakash J
Sent: Thursday, September 28, 2006 11:49 AM
To: Sendhil Kumar R
Cc: mailto:’peeyes@nospam.com’; mailto:’manu.k.tirumakudala@nospam.com’
Subject: Design Problem: Provide a solution for this problem
 
Our customer is a book seller who wants to develop an application which maintains the billing of the books.
 
Taxes & Duties

  • Sales tax for all the books is around 7%.
  • VAT is 4%.
  • If its an imported book then a 5% additional import tax is applicable
    Discounts

    • If purchase is more than 500/- RS then a discount of 5% is applicable
    • If purchase is more than 1000/- RS then a discount of 10% is applicable
    • If purchase is more than 1500/- RS then a discount of 15% is applicable
    • If purchase is more than 2000/- RS and above then a discount of 20% is applicable
    Exemption
    If the book category is Management then No discounts are applicable.
    When a purchase is made the system has to produce a receipt which lists the name of all the books and their price (including tax), finishing with the total cost of the books purchased, and the total amounts of sales tax/Vat/Import duty paid and discounts offered. 
     
    The total cost should always be rounded up (say for example if the billing amount Rs-349.34, it should be calculated as Rs-350/-)
     
    Sendhil: Decide your own interface to come up with a solution for this problem…
    Manu: If you want to participate, please feel free to come up with a design for this problem.
     
    Thanks & Regards,
    Prakash J 

    Advertisements
    1. AnoopRavi
      April 6, 2007 at 6:57 pm

      Did you get the solution to this Sendhil?

    2. Ram
      June 10, 2011 at 10:06 am

      Hi Sendil,

      please send me the solution to my mail id .

      Regards,
      Ram

      • June 10, 2011 at 11:23 pm

        It would be right to try a solution your self.

        Regards,
        Sendhil

      • March 6, 2012 at 11:46 pm

        pl send me the solution by mail

    3. March 6, 2012 at 11:47 pm

      pl send me the solution

    1. November 19, 2010 at 10:59 pm

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: