8 object oriented software design
Sponsored Links
This presentation is the property of its rightful owner.
1 / 52

การออกแบบและพัฒนาซอฟต์แวร์ บทที่ 8 Object-Oriented Software Design PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on
  • Presentation posted in: General

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

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


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

ปริญญา น้อยดอนไพร

สาขาวิชาวิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์และเทคโนโลยี

มหาวิทยาลัยราชภัฏสุราษฎร์ธานี


Object-Oriented Software Design

  • Object-Oriented Concept

  • Introduction to Object-Oriented Software Design


Object-Oriented Concept

  • Object & Class

  • Inheritance (การสืบทอด)

  • Polymorphism

  • Encapsulation

  • Class Relationship


Introduction to Object-Oriented Software Design


Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Object

  • Object World

  • Message

  • Method/Operation

  • Interface

  • Event

  • Responsibilities


Object


Click ( )

Object


Deliver (Mail)

Object

Person

Post Office

Deliver

Send Mail


Sell (10 Baht, Pepsi)

Object

Person

Vending Machine

Sell

Buy Pepsi


MoveToFloor (3)

Object

Person

Elevator

MoveToFloor

Open

Close

Go to 3rd floor


Class

Person

Somchai

Somsri

Somsak

Somying


Class

Student

Somchai

Somsri

Somsak

Somying


Class

Tennis Player

Paradorn

Venus

Marat

Martina


Class

Institute

Social Technology

Engineering

Science

Agricultural Technology


Class

  • Template

  • Name

  • Attributes

  • Operations

  • Responsibilities


Class


Class


Class


Class


Class


Student

Somchai

Somsri

Somsak

Somying

Object & Class


Student

Somchai

Somsri

Somsak

Somying

Object & Class


Object & Class

Student

Somchai

Somsri

Somsak

Somying


Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Cat

Dog

Person

Inheritance

Animal


Bus

Truck

Car

Inheritance

Land Vehicle


Sales Transaction

Rental Transaction

Lease Transaction

Inheritance

Transaction


Inheritance

  • Class Hierarchy

  • Sub Class

  • Super Class

  • Reusability

  • Overriding


Bus

Truck

Inheritance

Land Vehicle

Car

Toyota

Vios

Altis

Camry


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…


Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Polymorphism

DrawChart(1,2,1,2)

DrawRect(1,2,1,2)

DrawChart

DrawTriangle(1,1,1)

DrawCircle(1)

DrawChart(1,1,1)

DrawChart(1)


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”)  ?


Polymorphism

:HourlyPaidEmployee

calculatePay()

:PaySlip

:WeeklyPaidEmployee

getTotalPay()

calculatePay()

:MonthlyPaidEmployee

calculatePay()


Polymorphism

  • Overloading


Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Encapsulation

  • Abstraction

  • Information Hiding

  • Security


Encapsulation


Sell (10 Baht, Pepsi)

Encapsulation

Person

Vending Machine

Sell

Buy Pepsi


Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Class Relationship

  • Association

  • Aggregation

  • Composition

  • Generalization


Class Relationship

  • Association

Pilot

Planes


Class Relationship

  • Association

    • Son – Father

    • Customer – Operator

    • User - Computer


Class Relationship

  • Composition

Car

Engine

Seat

Wheel


Class Relationship

  • Composition

    • Car – Wheel, Engine, Seat

    • House – Window, Roof, Door, Wall

    • Computer – Monitor, CPU, Keyboard

    • Building – Rooms

    • Circle – Points

    • Book - Chapter


Class Relationship

  • Aggregation

Classroom

Student


Class Relationship

  • Aggregation

    • Classroom – Student

    • Keyboard – Key

    • Notebook – Paper

    • Computer – Monitor, CPU, Keyboard


Bus

Truck

Car

Class Relationship

  • Generalization

Land Vehicle


Class Relationship

  • Generalization

    • Car – Mercedes-Benz, BMW, Lexus

    • Animal – Cat, Rat, Dog


Introduction to Object-Oriented Software Design


  • Login