tailieunhanh - Lecture Java methods: Object-oriented programming and data structures (3rd AP edition): Chapter 20 - Maria Litvin, Gary Litvin
Chapter 20 - The Java collections framework. In this chapter we discuss the Java collections from the perspective of a user (that is a software developer). Then we put them to work in a fairly large project: a toy stock exchange. | The Java Collections Framework (20, "Chapter"); Copyright © 2015 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved. Java Methods Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin 3rd AP edition 20- In this chapter we discuss the Java collections from the perspective of a user (that is a software developer). Then we put them to work in a fairly large project: a toy stock exchange. Objectives: Learn a subset of the Java collections framework Practice working on a realistic software project as a team 20- Java collections framework is quite large; here we present only a subset. Only List and ArrayList (Chapter 11) are required for the AP exam. Overview Framework (in software): a general system of components and architectural solutions that provides development tools to programmers for use with a relatively wide range of applications. Collection: (hmm.) any collection of elements 20- In general a framework is a support | The Java Collections Framework (20, "Chapter"); Copyright © 2015 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved. Java Methods Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin 3rd AP edition 20- In this chapter we discuss the Java collections from the perspective of a user (that is a software developer). Then we put them to work in a fairly large project: a toy stock exchange. Objectives: Learn a subset of the Java collections framework Practice working on a realistic software project as a team 20- Java collections framework is quite large; here we present only a subset. Only List and ArrayList (Chapter 11) are required for the AP exam. Overview Framework (in software): a general system of components and architectural solutions that provides development tools to programmers for use with a relatively wide range of applications. Collection: (hmm.) any collection of elements 20- In general a framework is a support structure for something. Overview (cont’d) Collection, Iterator Lists, ListIterator List ArrayList LinkedList Stack Queue, PriorityQueue Sets Set TreeSet HashSet Maps Map TreeMap HashMap All these interfaces and classes are part of the package. Names of interfaces are in italics. 20- The most common way to use the collections framework is to create objects of library classes in your programs. However, you can also extend library classes and write your own classes that implement library interfaces. Overview (cont’d) 20- Some connections are not shown here because they muddy the concepts. For example, the Queue interface extends the Collection interface, but we want to use queues in a “pure” way, using only the four queue-specific methods: isEmpty, add, remove, peek. The same for Stack: strictly speaking it implements Collection, but we want to use only the four “pure stack” methods (isEmpty, push, pop, peek). Overview (cont’d) A collection holds references to objects .
đang nạp các trang xem trước