Thursday, 27 November 2008

CLASS DIAGRAM--2

Casestudy 1:-

GoGreen Bikes Required System

GoGreen Bikes is a bicycle hire company. The new system for keeping track of bike hiring will work as follows:A customer goes to the reception desk and asks for the type of bike they want to hire e.g. a woman’s ten speed racer in blue. The receptionist relays this information to one of the mechanics who brings out a suitable bike from the store room. The receptionist checks the bike number and looks up the details of this bike on the computer system to find the hire and deposit charges. If the customer accepts the cost of the hire the receptionist records customer details such as name, address and telephone number. She also records details about the hire transaction such as the start date, estimated number of days required and the bike number. The deposit and hire charge are paid by the customer and the system prints out a receipt. The customer then takes the bike and departs.For each customer, an account is kept of the amount charged and the amount paid. Recording such details is also the job of the receptionist.When the bike is returned, the customer tells the receptionist his or her name. The records are checked to see that they correspond with the bike that is being returned. The date of return is also checked; if the return is late, the customer is required to pay an extra charge.The bike is then examined by a mechanic to check for any damage. If the bike is in good condition, the mechanic records this on the system and the receptionist returns the deposit to the customer.Details of new bikes are recorded on the computer by a clerk.Additional functionality:· The system should keep a record of all customers and their past hire transactions.· Keep track of how many bikes a customer is hiring so that the customer gets one receipt for all bikes hired.· Cope with a customer who wants to hire bikes for different lengths of time.· Automatically work out any extra payments due for bikes that are returned late.· Keep track of the state of each bike e.g. in stock, hired or being repaired.· Provide the means to record details about specialist bikes e.g. tandems and penny farthings that are also available for special occasions.Procedure for building Class diagrams







1. Identifying the objects and deriving classes

List of nouns:-

  • GoGreen Bike


  • Bicycle


  • Bike


  • Customer


  • Bike number


  • Hire


  • Deposit charge


  • Records


  • Name


  • Address


  • Telephone number


  • Hire transactions


  • Start date


  • Receipt Account


  • Date of return


  • Deposit

  • Amount charged

  • Amount paid


  • Past hire transactions


  • Length of time


  • Stock


  • Specialist bike


  • Cost of hire



2. Identifying attributes of classesList of attributes:-·

  • Bike number


  • Deposit charge


  • Bike size


  • Bike status


  • Date of return


  • Deposit

  • Amount charged


  • Past hire transactions


  • Length of time


  • Tandems


  • Penny


  • cost of hire

3. Idendifying relation between classes





--Assosiation and multiplicity












--Aggregation--Inheritance








--Inheritance









--Final class diagram









1 comment:

  1. What CASE tool are you using, I wonder? Three of your associations are depicted with large diamonds at the 'to' end, which I thought at first meant they were all aggregations - that is how my case tool depicts them, any way.

    Associations are of three kinds; association, aggregation and composition.

    Can a customer get away with no payments?? 0..*?

    ReplyDelete