Download presentation
Presentation is loading. Please wait.
Published byFrancis Barber Modified over 9 years ago
1
SYSTEMSDESIGNANALYSIS 1 Chapter 22 Object-Oriented Design Jerry Post Copyright © 1997
2
SYSTEMSDESIGN 2 A Short History Traditional Programming Every program written by individuals. Repetitive, keep needing to solve the same problems. Bugs Goal: Reusability Create a library collection of objects that can be used in any program. Windows Programming Huge amount of material to learn about windows. Event-driven Mostly repetitive Create a window Actions (open, close …) Scroll bars, etc. Commercial Software Best to buy as much software as possible. Development is expensive. Example: DBMS, spreadsheet, etc.
3
SYSTEMSDESIGN 3 Objects and Properties Objects (entities) Something we wish to identify or track, e.g., Employee Product Customer Objects can be found within processes Objects will become tables Objects are described by Properties (attributes) Examples Employee ( ID, Name, DateHired, Department...) Product (ID, Description, ListPrice,...) Customer (ID, Name, Address, Telephone,...) A specific instance of an object is uniquely identified, e.g., an Employee ID identifies exactly one employee
4
SYSTEMSDESIGN 4 Objects and Classes Class: generic description Object: specific item, with data. Class definition--encapsulation Class Name Properties Methods Inheritance Relationships Derived classes Focus on differences Polymorphism Methods with the same name. Activated depending on the class of the object. Accounts Account# Customer# DateOpened CurrentBalance OpenAccount CloseAccount Class name Properties Methods Savings Accounts InterestRate PayInterest Checking Accounts MinimumBalance Overdrafts BillOverdraftFees CloseAccount Inheritance Polymorphism
5
SYSTEMSDESIGN 5 Objects & Events EventsMethodsObjects Sale Record Sale Update Inventory Notify Customer Service Transaction Log Accounts & Ledgers Inventory Customers Employees (commissions) Inventory Order/JIT Notify Suppliers Schedule Payment Accounts & Ledgers Suppliers Shipping/Receiving Installation & Maintenance
6
SYSTEMSDESIGN 6 Events and Triggers Business processes or events can be represented as triggers. A form, or a change in the data can cause the DBMS to trigger a subroutine which alters additional data. An event can cause an object to send a message to another object--changing a property, or activating a method. Ship Order Order form Invoice Adjust Inventory Items shipped Inventory changes Analyze Inventory Level Inventory data changes Reorder items trigger
7
SYSTEMSDESIGN 7 Event Triggers Business Process: Ship Product Trigger: Inventory Change Executes function/trigger in Inventory object. Object: Inventory Property: Current Inventory. Function: Update Inventory. Trigger: On Update, call Analyze function. Process: Analyze Inventory Function: Determine need to reorder. Trigger: Generate new order. Analyze Inventory Order Inventory Ship Product Trigger Inventory Change Trigger Analysis Trigger Inventory Order
8
SYSTEMSDESIGN 8 State Diagrams Objects often have a state It represents the current status of the object. It is changed or triggered by an event. Example (book): train Stopped Running Unloading State diagram shows how object’s state is changed by other objects and events. State = Stopped Train State = Running State = Unloading Notice the train cannot get to the unloading state from the running state. Heater: State = off Heater: State = on Thermostat message State change
9
SYSTEMSDESIGN 9 SDLC v. Object Oriented
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.