logging in or signing up OOConcepts Raffaele Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 520 Category: Education License: All Rights Reserved Like it (1) Dislike it (0) Added: February 05, 2008 This Presentation is Public Favorites: 1 Presentation Description No description available. Comments Posting comment... By: waladunqadhi (27 month(s) ago) Good ppt to use..please send this ppt to my email waladunqadhi@yahoo.com. Saving..... Post Reply Close Saving..... Edit Comment Close By: shanaka (28 month(s) ago) The contents of you presentation really helped me... Please forward me the PPT file for educational purpose. email address: shanakad@gmail.com Thanks, Shanaka Saving..... Post Reply Close Saving..... Edit Comment Close By: ashish81_surat (28 month(s) ago) good ppt thanks for uploding if possible, please send this ppt to my email address : ashish81_surat@yahoo.com Saving..... Post Reply Close Saving..... Edit Comment Close Premium member Presentation Transcript Object Oriented Concepts: Object Oriented ConceptsBasic OO Terms: Basic OO Terms Objects Classes Class attributes Relationships Methods (Services) Encapsulation Polymorhpism Inheritance ReuseObjects and Classes: Objects and Classes Object An abstract or concrete “thing”, an entity Each object instance must have a unique ID Attribute A property of an object Classes A groups of similar objects Have the same kind of attributesExample Class: Example Class The Class of Automobile Objects Attritubtes Vehicle Identification Number Manufacturer Color Type (sedan, roadster, pickup, etc) Price Etc …Example Object Instances: Example Object Instances VIN 8183764 Manu Ford Color Fuscia Type Pickup Price $28,000 VIN 132417 Manu Chevy Color Taupe Type Sedan Price $15,000 Relationships: Relationships Association (Connection) between classes 1:1, 1:M, M:N Whole – Part (Composition) The object is part of another object A cylinder head is part of a motor. Buttons, text boxes, etc. are part of a window. Have cardinality and optionality.Class Methods or Services: Class Methods or Services Methods Procedures What an object knows how to do. Similar to functions in other languages. Used to model object behavior. Associated with classes. Thus, classes have both attributes and methods.Automobile Class : Automobile Class Attritubtes VIN Manufacturer Color Type Price Methods (Services) Insert Update DeleteEncapsulation: Encapsulation Attributes and methods are packaged together. “Information hiding” Internal aspects are concealed or hidden. Objects are prevented from changing other objects. Message Passing: Message Passing User and other objects send messages to objects. Objects can be told to perform a service (method). Can be told to change itself. May result from Clicking a button, Choosing from a list, etc. Calling a methodPolymorhpism: Polymorhpism Methods with the same name may do different things. Depends on the object class they are associated with. Accounting example: Real Property and Computer Equipment are two asset classes. Both have Methods called “Calculate Depreciation.” Real Property is depreciated on a straight-line basis Computer equipment uses sum of the year’s digits.Hierarchies and Inheritance: Hierarchies and Inheritance Classes arranged in hierarchies of sub-classes and super-classes Attributes and methods are inherited by sub-classes Inherited properties may be over-ridden. Automobile Class Hierarchy: Automobile Class Hierarchy Motor Vehicles # of Wheels Engine Automobiles 4 Wheels # of Doors Motorcycles 2 Wheels Sidecar Pickups Bed Length Local attributes Over-riddenAccounting Class Hierarchy: Accounting Class Hierarchy Accounts Number Name Balance Liabilities Assets Depreciation Method Buildings Depreciation (Straight line) Computers Depreciation (Accelerated) Insurance Policy Object: Insurance Policy Object Attributes: Policy Number Policy Type Owner Premium Method: Calculate PenaltySlide16: Insurance Policies Home Flood Plain Date built Earthquake Date built Feet from source Surveyor Date built defined for all home policies. These attributes are local Date built Building material Last quake date Attribute Inheritance InheritedSlide17: Insurance Policies Home Calculate age Calculate age Earthquake These mehtods are inherited These are local Calculate age Calculate penalty Flood Plain Calculate age Calculate penalty Method InheritanceSlide18: Local Behaviors Insurance Policies Home Earthquake Calculate penalty $0.50 * (Days since last quake) Flood Plain Calculate penalty (100/Feet to source) * Appraised Value * .1 Local behaviors may have different characteristics.Slide19: Polymorphism Insurance Policies Home Earthquake Flood Plain Calculate penalty (100/Feet to source) * Appraised Value * .1 Calculate penalty $0.50 * (Days since last quake) Calculate penalty messageSlide20: Benefits Encapsulation provides data independence. e.g., change an from integer to decimal type without affecting other objects. Inheritance provides a parsimonious environment. Polymorphism allows applications to be generic, removing the need for handling "special cases" with Case statements of If’s. Objects can be placed in a library for reuse.Summary: Summary Objects entities Classes groups of similar objects Class attributes properties Relationships associations, part-whole Methods (Services) procedures Encapsulation data hiding Polymorhpism same method name,different proc. Inheritance properties passed to children Reuse object libraries You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
OOConcepts Raffaele Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 520 Category: Education License: All Rights Reserved Like it (1) Dislike it (0) Added: February 05, 2008 This Presentation is Public Favorites: 1 Presentation Description No description available. Comments Posting comment... By: waladunqadhi (27 month(s) ago) Good ppt to use..please send this ppt to my email waladunqadhi@yahoo.com. Saving..... Post Reply Close Saving..... Edit Comment Close By: shanaka (28 month(s) ago) The contents of you presentation really helped me... Please forward me the PPT file for educational purpose. email address: shanakad@gmail.com Thanks, Shanaka Saving..... Post Reply Close Saving..... Edit Comment Close By: ashish81_surat (28 month(s) ago) good ppt thanks for uploding if possible, please send this ppt to my email address : ashish81_surat@yahoo.com Saving..... Post Reply Close Saving..... Edit Comment Close Premium member Presentation Transcript Object Oriented Concepts: Object Oriented ConceptsBasic OO Terms: Basic OO Terms Objects Classes Class attributes Relationships Methods (Services) Encapsulation Polymorhpism Inheritance ReuseObjects and Classes: Objects and Classes Object An abstract or concrete “thing”, an entity Each object instance must have a unique ID Attribute A property of an object Classes A groups of similar objects Have the same kind of attributesExample Class: Example Class The Class of Automobile Objects Attritubtes Vehicle Identification Number Manufacturer Color Type (sedan, roadster, pickup, etc) Price Etc …Example Object Instances: Example Object Instances VIN 8183764 Manu Ford Color Fuscia Type Pickup Price $28,000 VIN 132417 Manu Chevy Color Taupe Type Sedan Price $15,000 Relationships: Relationships Association (Connection) between classes 1:1, 1:M, M:N Whole – Part (Composition) The object is part of another object A cylinder head is part of a motor. Buttons, text boxes, etc. are part of a window. Have cardinality and optionality.Class Methods or Services: Class Methods or Services Methods Procedures What an object knows how to do. Similar to functions in other languages. Used to model object behavior. Associated with classes. Thus, classes have both attributes and methods.Automobile Class : Automobile Class Attritubtes VIN Manufacturer Color Type Price Methods (Services) Insert Update DeleteEncapsulation: Encapsulation Attributes and methods are packaged together. “Information hiding” Internal aspects are concealed or hidden. Objects are prevented from changing other objects. Message Passing: Message Passing User and other objects send messages to objects. Objects can be told to perform a service (method). Can be told to change itself. May result from Clicking a button, Choosing from a list, etc. Calling a methodPolymorhpism: Polymorhpism Methods with the same name may do different things. Depends on the object class they are associated with. Accounting example: Real Property and Computer Equipment are two asset classes. Both have Methods called “Calculate Depreciation.” Real Property is depreciated on a straight-line basis Computer equipment uses sum of the year’s digits.Hierarchies and Inheritance: Hierarchies and Inheritance Classes arranged in hierarchies of sub-classes and super-classes Attributes and methods are inherited by sub-classes Inherited properties may be over-ridden. Automobile Class Hierarchy: Automobile Class Hierarchy Motor Vehicles # of Wheels Engine Automobiles 4 Wheels # of Doors Motorcycles 2 Wheels Sidecar Pickups Bed Length Local attributes Over-riddenAccounting Class Hierarchy: Accounting Class Hierarchy Accounts Number Name Balance Liabilities Assets Depreciation Method Buildings Depreciation (Straight line) Computers Depreciation (Accelerated) Insurance Policy Object: Insurance Policy Object Attributes: Policy Number Policy Type Owner Premium Method: Calculate PenaltySlide16: Insurance Policies Home Flood Plain Date built Earthquake Date built Feet from source Surveyor Date built defined for all home policies. These attributes are local Date built Building material Last quake date Attribute Inheritance InheritedSlide17: Insurance Policies Home Calculate age Calculate age Earthquake These mehtods are inherited These are local Calculate age Calculate penalty Flood Plain Calculate age Calculate penalty Method InheritanceSlide18: Local Behaviors Insurance Policies Home Earthquake Calculate penalty $0.50 * (Days since last quake) Flood Plain Calculate penalty (100/Feet to source) * Appraised Value * .1 Local behaviors may have different characteristics.Slide19: Polymorphism Insurance Policies Home Earthquake Flood Plain Calculate penalty (100/Feet to source) * Appraised Value * .1 Calculate penalty $0.50 * (Days since last quake) Calculate penalty messageSlide20: Benefits Encapsulation provides data independence. e.g., change an from integer to decimal type without affecting other objects. Inheritance provides a parsimonious environment. Polymorphism allows applications to be generic, removing the need for handling "special cases" with Case statements of If’s. Objects can be placed in a library for reuse.Summary: Summary Objects entities Classes groups of similar objects Class attributes properties Relationships associations, part-whole Methods (Services) procedures Encapsulation data hiding Polymorhpism same method name,different proc. Inheritance properties passed to children Reuse object libraries