TAILIEUCHUNG - Absolute C++ (4th Edition) part 63

Absolute C++ (4th Edition) part 63. KEY BENEFIT: C++ programming concepts and techniques are presented in a straightforward style using understandable language and code. KEY TOPICS: C++ Basics; Flow of Control; Function Basics; Parameters and Overloading; Arrays; Structures and Classes; Constructors; Operator Overloading, Friends, and References; Strings; Pointers and Dynamic Arrays; Separate Compilation and Namespaces; Streams and File I/O; Recursion; Inheritance; Polymorphism and Virtual Functions; Templates; Linked Data Structures; Exception Handling; Standard Template Library; Patterns and UML. MARKET: Useful for both beginning and intermediate C++ programmers. . | Polymorphism and Virtual Functions VIRTUAL FUNCTION BASICS 628 Late Binding 628 Virtual Functions in C 629 Tip The Virtual Property Is Inherited 636 Tip When to Use a Virtual Function 636 Pitfall Omitting the Definition of a Virtual Member Function 637 Abstract Classes and Pure Virtual Functions 637 Example An Abstract Class 638 POINTERS AND VIRTUAL FUNCTIONS 641 Virtual Functions and Extended Type Compatibility 641 Pitfall The Slicing Problem 645 Tip Make Destructors Virtual 646 Downcasting and Upcasting 647 How C Implements Virtual Functions 649 CHAPTER SUMMARY 650 ANSWERS TO SELF-TEST EXERCISES 651 PROGRAMMING PROJECTS 651 15 Polymorphism and Virtual Functions I did it my way. Frank Sinatra Introduction Polymorphism refers to the ability to associate many meanings to one function name by means of a special mechanism known as virtual functions or late binding. Polymorphism is one of the fundamental mechanisms of a popular and powerful programming philosophy known as object-oriented programming. Wow lots of fancy words This chapter will explain them. Section does not require the material from Chapters 10 pointers and dynamic arrays 12 file I O or 13 recursion . Section does not require the material from Chapters 12 file I O or 13 recursion but does require the material from Chapter 10 pointers and dynamic arrays . Virtual Function Basics virtual adj. 1. Existing or resulting in essence or effect though not in actual fact form or name. The American Heritage Dictionary of the English Language Third Edition A virtual function is so named because it may in a sense to be made clear be used before it is defined. Virtual functions will prove to be another tool for software reuse. LATE BINDING Virtual functions are best explained by an example. Suppose you are designing software for a graphics package that has classes for several kinds of figures such as rectangles circles ovals and so forth. Each figure might be an object of a different class. .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.