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

Slides:



Advertisements
Similar presentations
By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
Advertisements

General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
Chapter 1 Inheritance University Of Ha’il.
Chapter 4&5 Defining Classes Copyright © 2010 Pearson Addison-Wesley. All rights reserved.
ICS 201 Inheritance Introduction to Computer Science
1 Chapter 6: Extending classes and Inheritance. 2 Basics of Inheritance One of the basic objectives of Inheritance is code reuse If you want to extend.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Chapter 10 Introduction to Objects and Classess 1.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
HST 952 Computing for Biomedical Scientists Lecture 2.
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
Object-oriented Programming Concepts
Overview Objective: refine information gathered
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
BACS 287 Basics of Object-Oriented Programming 1.
Object-Oriented Programming: Inheritance Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Structural Modeling: Class Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Object Oriented Programming Lecturer: Andreas P. Adi
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Introduction to Objects Adapted from “TEN STEPS TO OBJECT-SPEAK” a CPT Tech Talk by Joy Starks September 17, 1999.
Object-Oriented Programming เอกสารประกอบการบรรยาย รายวิชา Browser-Based Application Development.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Programming With Java ICS Chapter 8 Polymorphism.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
Objectives Explain how events can be used to identify use cases that define requirements Identify and analyze events and resulting use cases Explain.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
CSC241 Object-Oriented Programming (OOP) Lecture No. 1.
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
CSCI 3327 Visual Basic Chapter 3: Classes and Objects UTPA – Fall 2011.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Object-Oriented Data Modeling
Learners Support Publications Object Oriented Programming.
Introduction to Object Orientation Dr. Ahmed Youssef.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Object-Oriented Principals Dwight Deugo Nesa Matic
03 | Object-Oriented Programming Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Object-Oriented Paradigm (OOP) Course Code: SE 101 Lecture No. 1.
Object means a real word entity such as pen, chair, table etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Programming With Java ICS201 University Of Ha’il1 ICS 201 Introduction to Computer Science Inheritance.
Sachin Malhotra Saurabh Choudhary
JAVA By Waqas.
Systems Analysis and Design With UML 2
Interfaces.
The Object-Oriented Thought Process Chapter 1
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Chapter 10 Thinking in Objects
Domain Class Diagram Chapter 4 Part 2 pp
UML Class Diagram.
Basic Object Oriented Approach
BCA-II Object Oriented Programming using C++
Object Oriented Analysis and Design
Object-Oriented Programming
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 Person Post Office Deliver (Mail) Deliver Send Mail

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

Object PersonElevator Go to 3 rd floor MoveToFloor (3) MoveToFloor Open Close

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 Name Attributes Operations Responsibilities

Class Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc...

Class Tennis Player FirstName LastName Nationality Ranking etc… RegisterForTournament etc...

Class Car Car Reg. Number Maker Model Color etc… Accelerate Stop etc...

Class Airplane Plane Number Manufacturer Model etc… TakeOff Landing etc...

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

Object & Class Student  Somchai  Somsri  Somsak  Somying Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc...

Object & Class Student  Somchai  Somsri  Somsak  Somying Student1 B Somchai Saetung 7146 Suranivet 7 etc… RegisterForCourse DropCourse etc...

Student1 B Somchai Saetung 7146 Suranivet 7 etc… RegisterForCourse DropCourse etc... Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc...

Object-Oriented Concept Object & Class Inheritance Polymorphism Encapsulation Class Relationship

Inheritance Animal DogPersonCat

Inheritance Land Vehicle TruckCarBus

Inheritance Transaction Rental Transaction Lease Transaction Sales Transaction

Inheritance Class Hierarchy Sub Class Super Class Reusability Overriding

Inheritance Land Vehicle Car Toyota TruckBus ViosAltisCamry

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

Object-Oriented Concept Object & Class Inheritance Polymorphism Encapsulation Class Relationship

Polymorphism DrawChart DrawChart(1) DrawChart(1,2,1,2) DrawChart(1,1,1) DrawTriangle(1,1,1) DrawRect(1,2,1,2) DrawCircle(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 :PaySlip :HourlyPaidEmployee :WeeklyPaidEmployee :MonthlyPaidEmployee  getTotalPay() calculatePay()

Polymorphism Overloading

Object-Oriented Concept Object & Class Inheritance Polymorphism Encapsulation Class Relationship

Encapsulation Abstraction Information Hiding Security

Encapsulation Student StudentID: B FirstName: Somchai LastName: Saetung Courses Registered: [204204], [204203] etc… DropCourse SetName GetName etc...

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

Object-Oriented Concept Object & Class Inheritance Polymorphism Encapsulation Class Relationship

Association Aggregation Composition Generalization

Class Relationship Association PilotPlanes

Class Relationship Association –Son – Father –Customer – Operator –User - Computer

Class Relationship Composition Car SeatWheelEngine

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 ClassroomStudent

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

Class Relationship Generalization Land Vehicle TruckCarBus

Class Relationship Generalization –Car – Mercedes-Benz, BMW, Lexus – Animal – Cat, Rat, Dog

Introduction to Object-Oriented Software Design