Identifying objects in an application
Identifying objects in an application
IDENTIFYING OBJECTS
Simple method
- identify nouns in Requirements specification. These are potential objects
- Identify verbs in requirements specification. These are potential operations
CRITERIA FOR PICKING OBJECTS
1)We remind that an object class has many objects as members 2)Wherever there is no possibility of confusion we use them synonymously
3) Objects should perform assigned services. In other words they must have responsibilities specified by us.
4) Objects must have relevant attributes which are necessary to perform service. Attributes must have Non-Null values.
5)A class must be essential for functioning of the system
6) Must have common set of attributes and operations which are necessary for all occurrences of the objects in the class
7) Objects should be independent of implementation of the system.
HOW TO SELECT OBJECTS
1) Potential objects are selected from word statement primarily by examining noun phrases
2) All Noun phrases need not be objects
3) If there are some objects whose attributes do not change during the functioning of a system we reject them. They are probably external entities
EXAMPLE 1 –WORD STATEMENT
ESSENTIALS OF AN ADMISSION PROCESS TO A UNIVERSITY ARE
• Applicants send applications to a university registrar’s office
• A clerk in the registrar's office scrutinizes applications to see if mark list is enclosed and fee paid
• If scrutiny successful applications passed on to the relevant department
• Departmental committee scrutinizes applications sent to it. Applications are ranked. Depending on the seats available decides to admit, wait list or reject. The application is returned with the message to the registrar’s office clerk.
• Registrar's office clerk informs the applicant the result of his applications
POTENTIAL OBJECTS
1. APPLICANT
2. APPLICATION
3. REGISTRAR’S OFFICE CLERK
4. DEPARTEMENTAL (COMMITTEE)
1. Applicant has attributes. However no operations performed on it. It is not an object in this problem.
2. Application has attributes operations are performed using attributes of
application. Result conveyed to applicant. Admit it as an object
3. Registrar’s office clerk has attributes, performs operations on application’s attributes and not on clerk’s attributes. Thus reject.
4. Department taken as potential object. It has attributes. Operations are performed using attributes. Operations are performed using attributes of application object and also using attributes of department. Thus admit department as an object
ATTRIBUTES AND OPERATIONS PERFORMED BY IDENTIFIED OBJECTS
EXAMPLE 2 : RECEIVING ITEMS ORDERED
• Receiving office receives several items from vendors
• Receiving office checks delivery note against orders and detects excess/deficient deliveries if any
• Discrepancy note (if any) sent to purchase office
• Receiving office sends items received note to inspection office
• Inspection office physically inspects items received and accepts good items.Bad items returned to vendor
• Items accepted note sent to stores office
• Discrepancy note sent to purchase office
• Stores office updates inventory based on items accepted note
• Stores office sends taken into stock report to the accounts office for payment to vendor
• Accounts office sends payments to vendors
PICKING RELEVANT OBJECTS POTENTIAL OBJECTS ARE:
1. RECEIVING OFFICE 2. ITEMS 3. VENDORS 4. DELIVERY NOTE
5. ORDERS 6. DISCREPANCY NOTE 7. PURCHASE OFFICE
8. ITEMS RECEIVED NOTE 9.INSPECTION OFFICE
10. ACCEPTED ITEMS NOTE 11. STORES OFFICE
12. INVENTORY 13. GOODS TAKEN IN STOCK REPORT
14. ACCOUNTS OFFICE 15. PAYMENT VOUCHER OBJECTS NOT RELEVANT TO THIS APPLICATION
• Items
• Orders
• Inventory
• Goods taken in stock
• Payment voucher
RELEVANT OBJECTS
Receiving office – Even though its own attributes are not relevant, its functional attributes are important. These are:
-Delivery note and order to vendor It thus derives its attributes from these
• VENDORS
No operations on this object are needed in this application. However its attributes are necessary as the Accounts office makes payment to vendors
VENDOR is actually an external object.We have thus given only attributes relevant to this application.In general design one would usually define this object more comprehensively
ATTRIBUTES OF DELIVERY NOTE AND ORDER TO VENDOR
Receiving office is selected as an object. Its attributes are attributes derived from delivery note and order to vendor
The class diagram is given below
Operations :
• Update inventory by adding no of items accepted to qty in stock
•Send advice to accounts object to make payment for qty accepted
Comments
Post a Comment