Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Ontology of Objects in Inheritance Copyright © 2006 Patrick McDermott UC Berkeley Extension

Similar presentations


Presentation on theme: "The Ontology of Objects in Inheritance Copyright © 2006 Patrick McDermott UC Berkeley Extension"— Presentation transcript:

1 The Ontology of Objects in Inheritance Copyright © 2006 Patrick McDermott UC Berkeley Extension pmcdermott@msn.com

2 Category  CRC Cards : Class  ERD : Entity Type  Relational : Relation  Database : Table  Programmer : Layout, struct  UML : Class  Etc., etc., etc. …: Type, Structure

3 Thing  CRC Cards : N/A  ERD : Entity  Relational : Tuple  Database : Row  Programmer : Record  UML : Object  Etc., etc., etc. …: Occurrence, Instance

4 Set Theory Russell’s Paradox –Where does the set of all sets that do not contain themselves belong? If IN the set, it contains itself so OUT. If OUT of the set, it doesn’t so IN.  Bertrand was depressed for 6 months! –Me: like contradictions about Mermaids –I do not think the Universe is arranged as Sets “This method is to define as the number of a class the class of all classes similar to the given class.”—Bertrand Russell

5 How We Think How many Definitions go: ____ is a kind of _____ and circle on up…. Windows Buttons –CCmndTarget ??? –Button, Radio, Checkbox C++ MFC: All have check attribute C#: Each is Different with appropriate attributes

6 Driver License at DMV Driver[’s] License –Car, Motorcycle, Truck –School Bus: it’s not a type of vehicle, it’s how the vehicle is used –Chauffeur’s License Often the rules are not made based on a classification; in fact, it’s hard to tease out the reasons: “legislative intent” Why Chocolate, Strawberry and Vanilla?

7 Biological Taxonomy It is undeniably Useful, BUT If inheritance is so natural, why was the work of Linnaeus a breakthrough? Nature Doesn’t Care –Why shouldn’t a Mammal lay an egg? –Marine Mammals are Kool! Period Table Lucky Ignorance –Would have been harder if Dmitri Mendeleev knew more

8 Things That Fly The O/O FLYERS Airplanes Birds Fish Airplanes Fly() Birds Fly() Fish Flying Fish: Fly() It’s hard to list all things that Fly It’s easy to say whether something Flies Time? Time Flies

9 Deitels’ School CommunityMember EmployeeAlumnus Deitels, Simply C++, p. 412. FacultyStaff Student TeacherAdministrator Administrators are like Staff, and like Faculty Students and Alumni can be Employees Aren’t Townies Community Members?

10 Deitel’s After Deitels, Simply C++, p. 413. Shape TwoDimensionalShapeThreeDimensionalShape CircleSquareTriangleSphereCubePyramid  sin  + cos  RectangleEllipse Should we exchange levels?

11 Multiple Inheritance  Can be A MESS Is possible in C++, But not C# (or Java) –Like pointers, removed & called “Improved” Is not Advisable to overuse But alas, the world does work that way –We each belong to many sub-classifications

12 Foods Booch OOD, p. 111 Food Dairy Product Bread Meat Fruits & Veggies BeefMilk Pasta Bran Flakes Banana High Protein High Carb

13 Which Way Plane & Solid, or Circle, Square Some Foods are Carbohydrates –Some CHO are Foods Same Males are Students –Some Students are Males Which Law is More Specific? –In Hazardous Material, Food –In Food, Poisons?

14 Payment? Customer Invoice Item Payment * * ? ? ? $$$ Credit Card Rail Cars


Download ppt "The Ontology of Objects in Inheritance Copyright © 2006 Patrick McDermott UC Berkeley Extension"

Similar presentations


Ads by Google