《面向对象软件工程》课程PPT教学课件(英文版)Chapter 2:Review of Object Orientation

object-Oriented Software Engineering Practical Software development using uml and Java Chapter 2: Review of object Orientation www.lloseng.com
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation

2. 1 What is object Orientation? Procedural paradigm Software is organized around the notion of procedures Procedural abstraction -Works as long as the data is simple Adding data abstractions -Groups together the pieces of data that describe some entit -Helps reduce the system's complexity Such as records and struc Object oriented paradigm: Organizing procedural abstractions in the context of data abstractions www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 2 2.1 What is Object Orientation? Procedural paradigm: • Software is organized around the notion of procedures • Procedural abstraction —Works as long as the data is simple • Adding data abstractions —Groups together the pieces of data that describe some entity —Helps reduce the system’s complexity. - Such as Records and structures Object oriented paradigm: • Organizing procedural abstractions in the context of data abstractions

object Oriented paradigm An approach to the solution of problems in which all computations are performed in the context of objects. The objects are instances of classes, which are data abstractions -contain procedural abstractions that operation on the objects A running program can be seen as a collection of objects collaborating to perform a given task www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 3 Object Oriented paradigm An approach to the solution of problems in which all computations are performed in the context of objects. • The objects are instances of classes, which: —are data abstractions —contain procedural abstractions that operation on the objects • A running program can be seen as a collection of objects collaborating to perform a given task

A View of the Two paradigms main Account credit perform transactio debit credit(debit(compute interes compute fees if checking if checking CheckingAccount Sav ings Accour then xxx then xxx if sav ings if savin compute interest compute interest then xxx then xxx compute fees etc etc www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation 4
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 4 A View of the Two paradigms main perform transaction compute fees if checking then xxx if sav ings then xxx etc. compute interest if checking then xxx if sav ings then xxx etc. credit debit Account credit debit Sav ingsAccount compute interest compute f ees CheckingAccount compute interest compute f ees

2.2 Classes and objects Obiect a chunk of structured data in a running software system ° Has properties -Represent its state as behaviou How it acts and reacts -May simulate the behaviour of an object in the real world www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 5 2.2 Classes and Objects Object • A chunk of structured data in a running software system • Has properties —Represent its state • Has behaviour —How it acts and reacts —May simulate the behaviour of an object in the real world

Objects Jan date of birth: 1955/02/02 address 9 9 UML St position: Manager Savings Account 1287 Greg: date of birth: 1970/01/01 opened:199703/03 ddress: 75 Object Di Margaret: date of birth: 1980/03/03 Mortgage Account 29865 address: 150 C++ Rd position: Teller opened:200008/12 property: 75 Object Dr. Transaction 487. amount: 200.00 time:200109/0114:30 Instant Teller 876 location: Java valley cafe www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 6 Objects Margaret: date of birth: 1980/03/03 position: Teller Transaction 487: amount: 200.00 time: 2001/09/01 14:30 Greg: date of birth: 1970/01/01 address: 75 Object Dr. Mortgage Account 29865: balance: 198760.00 opened: 2000/08/12 property: 75 Object Dr. Instant Teller 876: location: Java Valley Cafe Savings Account 12876: balance: 1976.32 opened: 1997/03/03 Jane: date of birth: 1955/02/02 position: Manager address: 99 UML St. address: 150 C++ Rd

Classes A class Is a unit of abstraction in an object oriented(Oo) rogram Represents similar objects -Its instances Is a kind of software module -Describes its instances'structure(properties) -Contains methods to implement their behaviour www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 7 Classes A class: • Is a unit of abstraction in an object oriented (OO) program • Represents similar objects —Its instances • Is a kind of software module —Describes its instances’ structure (properties) —Contains methods to implement their behaviour

Is Something a class or an Instance? Something should be a class if it could have instances Something should be an instance if it is clearly a single member of the set defined by a class Film Class: instances are individual films Reel of film: Class: instances are physical reels Film reel with serial number sw19876 Instance of reeloffilm Science fiction Instance of the class Genre Science fiction film · Class: instances include‘ Star Wars Showing of Star Wars'in the phoenix cinema at 7p.m Instance of ShowingofFilm www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation 8
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 8 Is Something a Class or an Instance? • Something should be a classif it could have instances • Something should be an instance if it is clearly a singlemember of the set defined by a class Film • Class; instances are individual films. Reel of Film: • Class; instances are physical reels Film reel with serialnumber SW19876 • Instance of ReelOfFilm Science Fiction • Instance of the class Genre. Science FictionFilm • Class; instancesinclude ‘Star Wars’ Showing of ‘Star Wars’in the Phoenix Cinema at 7 p.m.: • Instance of ShowingOfFilm

Naming classes Use capital letters e.g. BankAccount not bankAccount Singular nouns Use the right level of generality E. g Municipality, not city Make sure the name has only one meaning - E.g. bus' has several meanings www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 9 Naming classes • Use capital letters —E.g. BankAccount not bankAccount • Use singular nouns • Use the right level of generality —E.g. Municipality, not City • Make sure the name has only one meaning —E.g. ‘bus’ has several meanings

2.3 Instance variables Variables defined inside a class corresponding to data present in each instance · Attributes Simple data - E.g. name, dateOfBirth · Associations -Relationships to other important classes -E.g. supervisor, coursesTaken More on these in Chapter 5 www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 10 2.3 Instance Variables Variables defined inside a class corresponding to data present in each instance • Attributes —Simple data —E.g. name, dateOfBirth • Associations —Relationships to other important classes —E.g. supervisor, coursesTaken —More on these in Chapter 5
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 1:Software and Software Engineering.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 7:Focusing on Users and Their Tasks.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)总目录.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)导论(主讲:武长柱).ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)复习.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp14电子商务发展中的法律法规.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp9 电子商务开发技术.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp8 电子政务.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp7 物流与供应链管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp6 客户关系管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp5 网络银行与支付.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp4 网络营销与管理.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp3 电子商业与贸易.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp2 电子商务机理与模式.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp15 电子商务发展状况.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp12 电子商务网站建设.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp11 电子商务系统设计.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp10 电子商务安全技术.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp1 电子商务概述.ppt
- 徐州工程学院:《电子商务概论》课程教学资源(PPT课件讲稿)chp13 电子商务项目实施管理.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 3:Basing Software Development on Reusable Technology.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 4:Developing Requirements.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 5:Modelling with Classes.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 6:Using Design Patterns.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 1. Software and Software Engineering.pdf
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 8:Modelling Interactions and Behaviour.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 9:Architecting and Designing Softwarech09.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 10:Testing and Inspecting to Ensure High Quality.ppt
- 《面向对象软件工程》课程PPT教学课件(英文版)Chapter 11:Managing the Software Process.ppt
- 《PPT应用与计算机安全》讲义.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第10章 滤镜(上).ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第11章 滤镜(下).ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第1章 初识Photoshop 7.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第2章 基础工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第3章 绘图工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第4章 油漆桶和渐变工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第5章 路径及形状处理工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第6章 文字工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第7章 其他工具.ppt
- 《新标准中文版Photoshop7基础培训教程》教学资源(PPT课件讲稿)第8章 图层与蒙版第8章.ppt