Lecture 9: Collections

Lecture 9: Collections includes A collection, also called a container, is an object that groups multiple elements into a single unit; Collections are used to store, retrieve and manipulate data; A collection framework. | Lecture 9: Collections Lê Hồng Phương, Nguyễn Việt Hùng, Hà Mỹ Linh phuonglh@ Department of Mathematics, Mechanics and Informatics, Vietnam National University, Hanoi Content ● Collections ● Interfaces ● Implementations 2012-2013 Object-Oriented Programming: Collections 2 Collections ● ● A collection, also called a container, is an object that groups multiple elements into a single unit. Collections are used to store, retrieve and manipulate data. – ● A collection of cards, a mail folders, a telephone directory. 2012-2013 Object-Oriented Programming: Collections 3 A collection framework ● ● A collection framework is a unified architecture for representing and manipulating collections. Three components of a collection framework: – Interfaces: abstracts data types that represent collections – Implementations: concrete implementations of collection interfaces – Algorithms: methods that perform useful computations such as searching and sorting on objects implementing collection interfaces. 2012-2013 Object-Oriented Programming: Collections 4 Benefits of the Java collection framework ● Reduces programming efforts ● Increases program speed and quality ● Allows interoperability among unrelated APIs ● Reduces effort to learn and to use new APIs ● Reduces effort to design new APIs ● Fosters software reuse 2012-2013 Object-Oriented Programming: .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
272    19    1    24-11-2024
Đã 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.