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

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


  • 56 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

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

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

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

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


Object oriented software design

Object-Oriented Software Design

  • Object-Oriented Concept

  • Introduction to Object-Oriented Software Design


Object oriented concept

Object-Oriented Concept

  • Object & Class

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

  • Polymorphism

  • Encapsulation

  • Class Relationship


Introduction to object oriented software design

Introduction to Object-Oriented Software Design


Object oriented concept1

Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Object

Object

  • Object World

  • Message

  • Method/Operation

  • Interface

  • Event

  • Responsibilities


Object1

Object


Object2

Click ( )

Object


Object3

Deliver (Mail)

Object

Person

Post Office

Deliver

Send Mail


Object4

Sell (10 Baht, Pepsi)

Object

Person

Vending Machine

Sell

Buy Pepsi


Object5

MoveToFloor (3)

Object

Person

Elevator

MoveToFloor

Open

Close

Go to 3rd floor


Class

Class

Person

Somchai

Somsri

Somsak

Somying


Class1

Class

Student

Somchai

Somsri

Somsak

Somying


Class2

Class

Tennis Player

Paradorn

Venus

Marat

Martina


Class3

Class

Institute

Social Technology

Engineering

Science

Agricultural Technology


Class4

Class

  • Template

  • Name

  • Attributes

  • Operations

  • Responsibilities


Class5

Class


Class6

Class


Class7

Class


Class8

Class


Class9

Class


Object class

Student

Somchai

Somsri

Somsak

Somying

Object & Class


Object class1

Student

Somchai

Somsri

Somsak

Somying

Object & Class


Object class2

Object & Class

Student

Somchai

Somsri

Somsak

Somying


Object oriented concept2

Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Inheritance

Cat

Dog

Person

Inheritance

Animal


Inheritance1

Bus

Truck

Car

Inheritance

Land Vehicle


Inheritance2

Sales Transaction

Rental Transaction

Lease Transaction

Inheritance

Transaction


Inheritance3

Inheritance

  • Class Hierarchy

  • Sub Class

  • Super Class

  • Reusability

  • Overriding


Inheritance4

Bus

Truck

Inheritance

Land Vehicle

Car

Toyota

Vios

Altis

Camry


8 object oriented software design

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 concept3

Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Polymorphism

Polymorphism

DrawChart(1,2,1,2)

DrawRect(1,2,1,2)

DrawChart

DrawTriangle(1,1,1)

DrawCircle(1)

DrawChart(1,1,1)

DrawChart(1)


Polymorphism1

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


Polymorphism2

Polymorphism

:HourlyPaidEmployee

calculatePay()

:PaySlip

:WeeklyPaidEmployee

getTotalPay()

calculatePay()

:MonthlyPaidEmployee

calculatePay()


Polymorphism3

Polymorphism

  • Overloading


Object oriented concept4

Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Encapsulation

Encapsulation

  • Abstraction

  • Information Hiding

  • Security


Encapsulation1

Encapsulation


Encapsulation2

Sell (10 Baht, Pepsi)

Encapsulation

Person

Vending Machine

Sell

Buy Pepsi


Object oriented concept5

Object-Oriented Concept

  • Object & Class

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Class Relationship


Class relationship

Class Relationship

  • Association

  • Aggregation

  • Composition

  • Generalization


Class relationship1

Class Relationship

  • Association

Pilot

Planes


Class relationship2

Class Relationship

  • Association

    • Son – Father

    • Customer – Operator

    • User - Computer


Class relationship3

Class Relationship

  • Composition

Car

Engine

Seat

Wheel


Class relationship4

Class Relationship

  • Composition

    • Car – Wheel, Engine, Seat

    • House – Window, Roof, Door, Wall

    • Computer – Monitor, CPU, Keyboard

    • Building – Rooms

    • Circle – Points

    • Book - Chapter


Class relationship5

Class Relationship

  • Aggregation

Classroom

Student


Class relationship6

Class Relationship

  • Aggregation

    • Classroom – Student

    • Keyboard – Key

    • Notebook – Paper

    • Computer – Monitor, CPU, Keyboard


Class relationship7

Bus

Truck

Car

Class Relationship

  • Generalization

Land Vehicle


Class relationship8

Class Relationship

  • Generalization

    • Car – Mercedes-Benz, BMW, Lexus

    • Animal – Cat, Rat, Dog


Introduction to object oriented software design1

Introduction to Object-Oriented Software Design


  • Login