《JAVA OOP开发》英文版 Chapter 1 Introduction to Object-oriented Programming and Software Development

Chapter 1 Introduction to Object-oriented Programming and Software Development Introduction to Object-Oriented Programming 2000 McGraw-Hl‖ Java--Wu Chapter 1-1
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 1 Chapter 1 Introduction to Object-oriented Programming and Software Development

Chapter 1 objectives After you have read and studied this chapter, you should be able to e Name the basic components of object-oriented programming e Differentiate classes and objects e Differentiate class and instance methods e Differentiate class and instance data values e Draw object diagrams using icons for classes objects and other components of object-oriented programming e Describe the significance of inheritance in object-oriented programs. Name and explain the stages of the software life cycle C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-2
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 2 Chapter 1 Objectives After you have read and studied this chapter, you should be able to Name the basic components of object-oriented programming. Differentiate classes and objects. Differentiate class and instance methods. Differentiate class and instance data values. Draw object diagrams using icons for classes, objects, and other components of object-oriented programming. Describe the significance of inheritance in object-oriented programs. Name and explain the stages of the software life cycle

Classes and objects r Object-oriented programs use objects r An object is a thing both tangible and intangible Account, Vehicle, Employee, eto r To create an object inside the computer program, we must provide a definition for objects--how they behave and what kinds of information they maintain -called a class. r An object is called an instance of a class C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-3
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 3 Classes and Objects Object-oriented programs use objects. An object is a thing, both tangible and intangible. Account, Vehicle, Employee, etc. To create an object inside the computer program, we must provide a definition for objects—how they behave and what kinds of information they maintain —called a class. An object is called an instance of a class

Graphical Representation of an object The objects name appears on top of the sV129 Icon Account An icon for an object is The class name is the rounded rectangle placed inside the object icon customer1 The class name may be omitted when it is clear from the context which class the object belongs to C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-4
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 4 Graphical Representation of an Object Account SV129 The class name is placed inside the object icon. The object’s name appears on top of the icon. An icon for an object is the rounded rectangle. The class name may be omitted when it is clear from the context which class the object belongs to. customer1

Graphical Representation of a Class The class name appears on top of the Account Icon An icon for a class is the tangle C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-5
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 5 Graphical Representation of a Class Account The class name appears on top of the icon. An icon for a class is the rectangle

Instance-of Relationship Employee Before you can create instances of a class the class must be defined The dotted line shows he instance-of relationship Bill Steve And The class name can be omitted since it is clear Employee Employee Employee which class these objects belong to C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-6
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 6 Instance-of Relationship Employee Employee Bill Employee Steve Employee Andy The class name can be omitted since it is clear which class these objects belong to . The dotted line shows the instance-of relationship. Before you can create instances of a class, the class must be defined

Messages and methods r To instruct a class or an object to perform a task, we send a message to it You can send a message only to the classes and objects the at understand the message you sent to them r a class or an object must possess a matching method to be able to handle the received message ra method defined for a class is called a class method and a method defined for an object is called an instance method r A value we pass to an object when sending a message is called an argument of the message C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-7
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 7 Messages and Methods To instruct a class or an object to perform a task, we send a message to it. You can send a message only to the classes and objects that understand the message you sent to them. A class or an object must possess a matching method to be able to handle the received message. A method defined for a class is called a class method, and a method defined for an object is called an instance method. A value we pass to an object when sending a message is called an argument of the message

Sending a message Message deposit with the argument 250.00 is sent to chk-008 chk-008 Account deposit 250.00 -deposit Message name is usually omitted in the diagram 250.00 D deposit C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-8
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 8 Sending a Message Message deposit with the argument 250.00 is sent to chk-008. Account chk-008 deposit deposit 250.00 Message name is usually omitted in the diagram. deposit 250.00

Sending a Message and getting an Answer This message has no argument chk-008 Account getMonthlyFee monthly fee The method returns the value monthly fee back to the message sender C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-9
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 9 Sending a Message and Getting an Answer This message has no argument. Account chk-008 getMonthlyFee monthly fee The method returns the value monthly fee back to the message sender

Calling a class method Account → >IgetAverageBalance average balance The average balance of all accounts is returned C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-10
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 10 Calling a Class Method Account getAverageBalance average balance The average balance of all accounts is returned
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《JAVA OOP开发》英文版 Introduction to Computers and Programming Languages.ppt
- 《Windows DNA应用程式》 面向对象分析与设计讲义.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第四章 第四讲 分支结构.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第十二章 文件.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第十一章 复杂数据类型及排序.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第六讲 数组.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第六讲 数组.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第七章(7-2)指针与指针变量.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第五章 循环结构.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第二章 数据类型与运算符.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第二讲 数据类型与算术运算.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第九讲 函数.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第九章 函数.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第三章 运算符与表达式.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第三讲 运算与顺序结构.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第七章 指针.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第七讲 数据存储机制.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(PPT课件讲稿)第一章 C语言基础.ppt
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)第一讲 C语言基础.doc
- 北大青鸟:《程序设计基础:C语言实现》课程教学资源(教案讲义)作业:电话号码存储系统.doc
- 《JAVA OOP开发》英文版 Chapter 2 Java Programming Basics.ppt
- 《JAVA OOP开发》英文版 Chapter 3 Numerical Data.ppt
- 《JAVA OOP开发》英文版 Chapter 4 Defining Instantiable Classes.ppt
- 《JAVA OOP开发》英文版 Chapter 5 Processing Input with Applets.ppt
- 《JAVA OOP开发》英文版 Chapter 6 Selection statements.ppt
- 《JAVA OOP开发》英文版 Chapter 7 Repetition Statements.ppt
- 《JAVA OOP开发》英文版 Chapter 8 Characters and strings.ppt
- 《JAVA OOP开发》英文版 Chapter 9 objectives.ppt
- 《JAVA OOP开发》英文版 Chapter 10 Sorting and Searching.ppt
- 《JAVA OOP开发》英文版 Chapter 11 File Input and Output.ppt
- 《JAVA OOP开发》英文版 Chapter 12 Reusable classes and packages.ppt
- 《JAVA OOP开发》英文版 Chapter 13 GUI Objects and Event-Driven Programming.ppt
- 《JAVA OOP开发》英文版 Chapter 14 Inheritance and Polymorphism.ppt
- 《JAVA OOP开发》英文版 Chapter 15 Case Study Class Roster Maintenance program.ppt
- 《JAVA OOP开发》英文版 Chapter 16 Chapter 16 Recursive algorithms.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第一章 绪论.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第七章 牛行接与应用.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第三章 MCS-51单片机指令系统.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第九章 A/D、D/A转换接口.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第二章 MCS-51学机组成理.ppt