1 / 52

ซอฟต์แวร์พัฒนาระบบฐานข้อมูล บทที่ 8 Object-Oriented Software Design

ซอฟต์แวร์พัฒนาระบบฐานข้อมูล บทที่ 8 Object-Oriented Software Design. ปริญญา น้อยดอนไพร สาขาวิชาวิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์และเทคโนโลยี มหาวิทยาลัยราช ภัฏ สุราษฎร์ธานี. Object-Oriented Software Design. Object-Oriented Concept Introduction to Object-Oriented Software Design.

ranae
Download Presentation

ซอฟต์แวร์พัฒนาระบบฐานข้อมูล บทที่ 8 Object-Oriented Software Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ซอฟต์แวร์พัฒนาระบบฐานข้อมูลบทที่ 8 Object-Oriented Software Design ปริญญา น้อยดอนไพร สาขาวิชาวิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์และเทคโนโลยี มหาวิทยาลัยราชภัฏสุราษฎร์ธานี

  2. Object-Oriented Software Design • Object-Oriented Concept • Introduction to Object-Oriented Software Design

  3. Object-Oriented Concept • Object & Class • Inheritance (การสืบทอด) • Polymorphism • Encapsulation • Class Relationship

  4. Introduction to Object-Oriented Software Design

  5. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation • Class Relationship

  6. Object • Object World • Message • Method/Operation • Interface • Event • Responsibilities

  7. Object

  8. Click ( ) Object

  9. Deliver (Mail) Object Person Post Office Deliver Send Mail

  10. Sell (10 Baht, Pepsi) Object Person Vending Machine Sell Buy Pepsi

  11. MoveToFloor (3) Object Person Elevator MoveToFloor Open Close Go to 3rd floor

  12. Class Person Somchai Somsri Somsak Somying

  13. Class Student Somchai Somsri Somsak Somying

  14. Class Tennis Player Paradorn Venus Marat Martina

  15. Class Institute Social Technology Engineering Science Agricultural Technology

  16. Class • Template • Name • Attributes • Operations • Responsibilities

  17. Class

  18. Class

  19. Class

  20. Class

  21. Class

  22. Student Somchai Somsri Somsak Somying Object & Class

  23. Student Somchai Somsri Somsak Somying Object & Class

  24. Object & Class Student Somchai Somsri Somsak Somying

  25. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation • Class Relationship

  26. Cat Dog Person Inheritance Animal

  27. Bus Truck Car Inheritance Land Vehicle

  28. Sales Transaction Rental Transaction Lease Transaction Inheritance Transaction

  29. Inheritance • Class Hierarchy • Sub Class • Super Class • Reusability • Overriding

  30. Bus Truck Inheritance Land Vehicle Car Toyota Vios Altis Camry

  31. Sales Transaction Rental Transaction Lease Transaction transNo transDate transTime etc… quantitySold… transNo transDate transTime etc… memberNo… transNo transDate transTime etc… duration… Transaction transNo transDate transTime etc…

  32. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation • Class Relationship

  33. Polymorphism DrawChart(1,2,1,2) DrawRect(1,2,1,2) DrawChart DrawTriangle(1,1,1) DrawCircle(1) DrawChart(1,1,1) DrawChart(1)

  34. Polymorphism • Add(integer, integer) • Add(string, string) • Add(string, integer) • Add(1,1)  2 • Add(“Hello”, “World”)  “HelloWorld” • Add(“Hello”, 2)  “Hello2” • Add(2, “Hello”)  ?

  35. Polymorphism :HourlyPaidEmployee calculatePay()  :PaySlip :WeeklyPaidEmployee getTotalPay() calculatePay() :MonthlyPaidEmployee calculatePay()

  36. Polymorphism • Overloading

  37. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation • Class Relationship

  38. Encapsulation • Abstraction • Information Hiding • Security

  39. Encapsulation

  40. Sell (10 Baht, Pepsi) Encapsulation Person Vending Machine Sell Buy Pepsi

  41. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation • Class Relationship

  42. Class Relationship • Association • Aggregation • Composition • Generalization

  43. Class Relationship • Association Pilot Planes

  44. Class Relationship • Association • Son – Father • Customer – Operator • User - Computer

  45. Class Relationship • Composition Car Engine Seat Wheel

  46. Class Relationship • Composition • Car – Wheel, Engine, Seat • House – Window, Roof, Door, Wall • Computer – Monitor, CPU, Keyboard • Building – Rooms • Circle – Points • Book - Chapter

  47. Class Relationship • Aggregation Classroom Student

  48. Class Relationship • Aggregation • Classroom – Student • Keyboard – Key • Notebook – Paper • Computer – Monitor, CPU, Keyboard

  49. Bus Truck Car Class Relationship • Generalization Land Vehicle

More Related