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: .