《C++程序设计》(英文版) Chapter 14 Topics

Programming in c++ Object-Oriented Software Development Dale/eems/Headington
1 Object-Oriented Software Development

Programming in C++ Chapter 14 Topics o Structured Programming vS Object-Oriented Programming o Using Inheritance to Create a New C++ class Type o Using Composition(Containment) to Create a New C++ class Type x Static vS. Dynamic Binding of Operations to Objects Virtual Member Functions Object-Oriented Design Implementing the Design
2 Chapter 14 Topics ❖Structured Programming vs. Object-Oriented Programming ❖Using Inheritance to Create a New C++ class Type ❖Using Composition (Containment) to Create a New C++ class Type ❖Static vs. Dynamic Binding of Operations to Objects ❖Virtual Member Functions ❖Object-Oriented Design ❖Implementing the Design

Programming in C++ Structured Programming vs Object-Oriented programming Structured(procedural)programming: the construction of programs that are collections of interacting functions or procedures Object-oriented programming(ooP) the use of abstraction, inheritance, and dynamic binding to construct programs that are collections of interacting objects
3 Structured Programming vs. Object-Oriented programming ❖Structured(procedural)programming:the construction of programs that are collections of interacting functions or procedures. ❖Object-oriented programming(OOP):the use of abstraction, inheritance, and dynamic binding to construct programs that are collections of interacting objects

Programming in C++ Two Programming Paradigms Structural ( Procedural) Obiect-Oriented PROGRAM PROGRAM(OOP) FUNCTION OBJECT Operations FUNCTION Data OBJECT OBJECT Operations FUNCTION Operations Data Data
4 Two Programming Paradigms Structural (Procedural) Object-Oriented PROGRAM PROGRAM(OOP) FUNCTION FUNCTION FUNCTION OBJECT Operations Data OBJECT Operations Data OBJECT Operations Data

Programming in C++ Object-Oriented Programming Language Features 1. Data abstraction 2. Inheritance of properties 3. Dynamic binding of operations to objects
5 Object-Oriented Programming Language Features 1. Data abstraction 2. Inheritance of properties 3. Dynamic binding of operations to objects

Programming in C++ Obiects OOP Terms C++ Equivalents Object Class object or class instance Instance variable Private data member Method Public member function Message passing Function call( to a public member function
6 OOP Terms C++ Equivalents Object Class object or class instance Instance variable Private data member Method Public member function Message passing Function call ( to a public member function ) Objects

Programming in C++ What is an object? OBJECT set of methods Operations (public member functions) Data internal state (values of private data members)
7 What is an object? OBJECT Operations Data set of methods (public member functions) internal state (values of private data members)

Programming in C++ Relationship Between Two Classes In C++, we define the properties and behavior of objects by using the class mechanism The three most common relationships between two classes are as follows 1. Two classes are independent of each other and have nothing in common 2. Two classes are related by inheritance 3. Two classes are related by composition
8 Relationship Between Two Classes ❖In C++, we define the properties and behavior of objects by using the class mechanism. ❖The three most common relationships between two classes are as follows: 1. Two classes are independent of each other and have nothing in common. 2. Two classes are related by inheritance. 3. Two classes are related by composition

Programming in C++ Inheritance Hierarchy Among Vehicles vehicle wheeled vehicle boat car bicycle two-door four-door Every car is a wheeled vehicle 9
9 Inheritance Hierarchy Among Vehicles vehicle wheeled vehicle boat car bicycle two-door four-door Every car is a wheeled vehicle

Programming in C++ Inheritance is a mechanism by which one class acquires (inherits) the properties(both data and operations) of another class the class being inherited from is the Base class (Superclass) the class that inherits is the Derived class (Subclass) .g the derived class is then specialized by adding properties specific to it 10
10 Inheritance ❖ is a mechanism by which one class acquires (inherits) the properties (both data and operations) of another class ❖ the class being inherited from is the Base Class (Superclass) ❖ the class that inherits is the Derived Class (Subclass) ❖ the derived class is then specialized by adding properties specific to it
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《C++程序设计》(英文版) Chapter 13 Topics.ppt
- 《C++程序设计》(英文版) Chapter 12 Topic.ppt
- 《C++程序设计》(英文版) Chapter 11 Topics.ppt
- 《C++程序设计》(英文版) Chapter 10 Topics.ppt
- 《C++程序设计》(英文版) Chapter 9 Topics.ppt
- 《C++程序设计》(英文版) Chapter 8 Topics.ppt
- 《C++程序设计》(英文版) Chapter 7 Topics.ppt
- 《C++程序设计》(英文版) Chapter 6 Topics.ppt
- 《C++程序设计》(英文版) Chapter 5 Topics.ppt
- 《C++程序设计》(英文版) Chapter 4 Topics.ppt
- 《C++程序设计》(英文版) Chapter 3 Topics.ppt
- 《C++程序设计》(英文版) Chapter 2 Topics.ppt
- 《C++程序设计》(英文版) Chapter 1 Topics.ppt
- 《网络互连技术教程》第9章 广播.ppt
- 《网络互连技术教程》第8章 用户数据报协议—UDP.ppt
- 《网络互连技术教程》第7章 CMP和网络状态.ppt
- 《网络互连技术教程》第6章 地址解析.ppt
- 《网络互连技术教程》第5章 子网与超网.ppt
- 《网络互连技术教程》第4章 网络互连协议——IP.ppt
- 《网络互连技术教程》第3章 网络接入技术.ppt
- 《C++程序设计》(英文版) Chapter 15 Topics.ppt
- 《Java编程技术基础》第一章 面向对象原理与实现.ppt
- 《Java编程技术基础》第二章 Java的实现基础.ppt
- 《Java编程技术基础》第二章习题.doc
- 《Java编程技术基础》第三章 类与对象(一).ppt
- 《Java编程技术基础》第三章习题.doc
- 《Java编程技术基础》第四章 类与对象(二).ppt
- 《Java编程技术基础》第四章习题.doc
- 《Java编程技术基础》第五章 异常与垃圾收集.ppt
- 《Java编程技术基础》第五章习题.doc
- 《Java编程技术基础》第十一章 Java集合框架.ppt
- 《Java编程技术基础》第十一章习题.doc
- 《Java编程技术基础》第二章 JDBC.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第14章 图形处理.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第3章 窗体.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第5章 Visual Basic语法基础.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第6章 顺序结构.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第7章 选择结构.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第8章 循环.ppt
- 武汉外语外事职业学院:《VisualBasic语言程序设计教程》第二版 第9章 数组.ppt