Data Structures and Abstractions with Java™ Third Edition by Frank M. Carrano

Sinopsis

this morning, you went to the back of a line to wait for the cashier. The line organized people chronologically. The first person in the line was the first to be served and to leave the line.

Eventually, you reached the front of the line and left the store with a bag containing your purchases. The items in the bag were in no particular order, and some of them were the same.

Do you see a stack of books or a pile of papers on your desk? It’s easy to look at or remove the top item of the stack or to add a new item to the top of the stack. The items in a stack also are organized chronologically, with the item added most recently on top and the item added first on
the bottom.

At your desk, you see your to-do list. Each entry in the list has a position that might or might not be important to you. You may have written them either as you thought of them, in their order of importance, or in alphabetical order. You decide the order; the list simply provides places for your entries.

Your dictionary is an alphabetical list of words and their definitions. You search for a word and get its definition. If your dictionary is printed, the alphabetical organization helps you to locate a word quickly. If your dictionary is computerized, its alphabetical organization is hidden, but it still speeds the search.

Speaking of your computer, you have organized your files into folders, or directories. Each folder contains several other folders or files. This type of organization is hierarchical. If you drew a picture of it, you would get something like a family tree or a chart of a company’s internal departments. These data organizations are similar and are called trees.

Finally, notice the road map that you are using to plan your weekend trip. The diagram of roads and towns shows you how to get from one place to another. Often, several ways are possible. One way might be shorter, another faster. The road map has an organization known as a graph.

Content

  1. Bags
  2. Bag Implementations That Use Arrays
  3. A Bag Implementation That Links Data
  4. The Efficiency of Algorithms
  5. Stacks
  6. Stack Implementations
  7. Recursion
  8. An Introduction to Sorting
  9. Faster Sorting Methods
  10. Queues, Deques, and Priority Queues
  11. Queue, Deque, and Priority Queue Implementations
  12. Lists
  13. List Implementations That Use Arrays
  14. A List Implementation That Links Data
  15. Iterators
  16. Sorted Lists
  17. Inheritance and Lists
  18. Searching
  19. Dictionaries
  20. Dictionary Implementations
  21. Introducing Hashing
  22. Hashing as a Dictionary Implementation
  23. Trees
  24. Tree Implementations
  25. A Binary Search Tree Implementation
  26. A Heap Implementation
  27. Balanced Search Trees
  28. Graphs
  29. Mutable, Immutable, and Cloneable Objects




The Java Virtual Machine



• Provides hardware platform specifications
• Reads compiled byte codes that are platform-independent
• Is implemented as software or hardware
• Is implemented in a Java technology development tool or a Web browser

JVM provides definitions for the:
• Instruction set (central processing unit [CPU])
• Register set
• Class file format
• Stack
• Garbage-collected heap
• Memory area
• Fatal error reporting
• High-precision timing support

• The majority of type checking is done when the code is compiled.
• Implementation of the JVM approved by Sun Microsystems must be able to run any compliant class file.
• The JVM executes on multiple operating environments

Primary Goals of the Java Technology



1.  Provides an easy-to-use language by:

  • Avoiding many pitfalls of other languages
  • Being object-oriented
  • Enabling users to create streamlined and clear code

2. Provides an interpreted environment for:

  • Improved speed of development
  • Code portability

3. Enables users to run more than one thread of activity
4. Loads classes dynamically; that is, at the time they are
actually needed
5.  Supports changing programs dynamically during
runtime by loading classes from disparate sources
6.  Furnishes better security

The following features fulfill these goals:
• The Java Virtual Machine (JVM™)1
• Garbage collection
• The Java Runtime Environment (JRE)
• JVM tool interface

What Is the Java™ Technology?



Java technology is:

  • A programming language
  • A development environment
  • An application environment
  • A deployment environment
  • It is similar in syntax to C++.
  •  It is used for developing both applets and applications

Flag Country

free counters