TAILIEUCHUNG - Concepts, Techniques, and Models of Computer Programming - Chapter 7

Object-Oriented Programming Chương này giới thiệu một cách đặc biệt hữu ích của cơ cấu chương trình trạng thái được gọi là lập trình hướng đối tượng. Nó giới thiệu một khái niệm mới trong chương cuối cùng, cụ thể là thừa kế, cho phép xác định ADTs trong thời trang gia tăng. Tuy nhiên, mô hình tính toán là mô hình trạng thái giống như trong chương trước. Chúng tôi lỏng lẻo có thể xác định lập trình hướng đối tượng là chương trình đóng gói, nhà nước rõ ràng, và thừa kế. Nó thường được hỗ trợ. | Chapter 7 Object-Oriented Programming The fruit is too well known to need any description of its external characteristics. - From entry Apple Encyclopaedia Britannica 11th edition This chapter introduces a particularly useful way of structuring stateful programs called object-oriented programming. It introduces one new concept over the last chapter namely inheritance which allows to define ADTs in incremental fashion. However the computation model is the same stateful model as in the previous chapter. We can loosely define object-oriented programming as programming with encapsulation explicit state and inheritance. It is often supported by a linguistic abstraction the concept of class but it does not have to be. Object-oriented programs can be written in almost any language. From a historical viewpoint the introduction of object-oriented programming made two major contributions to the discipline of programming. First it made clear that encapsulation is essential. Programs should be organized as collections of ADTs. This was first clearly stated in the classic article on information hiding 142 reprinted in 144 . Each module component or object has a secret known only to itself. Second it showed the importance of building ADTs incrementally using inheritance. This avoids duplicated code. Object-oriented programming is one of the most successful and pervasive areas in informatics. From its timid beginnings in the 1960 s it has invaded every area of informatics both in scientific research and technology development. The first object-oriented language was Simula 67 developed in 1967 as a descendant of Algol 60 130 137 152 . Simula 67 was much ahead of its time and had little immediate influence. Much more influential in making object-oriented programming popular was Smalltalk-80 released in 1980 as the result of research done in the 1970 s 60 . The currently most popular programming languages Java and C are object-oriented 186 184 . The most popular language-independent

TỪ KHÓA LIÊN QUAN
Đã 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.