A Practical Introduction to Data Structures and Algorithm by Clifford A. Shaffer

By Clifford A. Shaffer

Show description

Read or Download A Practical Introduction to Data Structures and Algorithm Analysis Third Edition (Java Version) PDF

Similar programming: programming languages books

Java and the Java Virtual Machine: Definition, Verification, Validation

This publication offers a high-level description, including a mathematical and an experimental research, of Java and of the Java digital computing device (JVM), together with a regular compiler of Java courses to JVM code and the safety serious bytecode verifier element of the JVM. the outline is established into language layers and computing device parts.

Additional info for A Practical Introduction to Data Structures and Algorithm Analysis Third Edition (Java Version)

Example text

Kernighan and Pike’s The Practice of Programming [KP99] discusses a number of practical issues related to programming, including good coding and documentation style. ) introduction to the difficulties involved with writing large programs, read the classic The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks [Bro95]. Sec. 6 Exercises 21 If you want to be a successful Java programmer, you need good reference manuals close at hand. David Flanagan’s Java in a Nutshell [Fla05] provides a good reference for those familiar with the basics of the language.

We don’t want to build this rendering functionality into the object subclasses. Instead, we want to pass to the subroutine performing the rendering action a method or class that does the appropriate rendering details for that output device. That is, we wish to hand to the object the appropriate “strategy” for accomplishing the details of the rendering task. Thus, we call this approach the Strategy design pattern. The Strategy design pattern will be discussed further in Chapter 7. There, a sorting function is given a class (called a comparator) that understands how to extract and compare the key values for records to be sorted.

Each such method will traverse through the collection of objects, visiting each object in turn. , page, column, row, character). We can cut the code down some by using the visitor design pattern so that we only need to write the traversal once, and then write a visitor subroutine for each action that might be applied to the collection of objects. But each such visitor subroutine must still contain logic for dealing with each of the possible subclasses. In our page composition application, there are only a few activities that we would like to perform on the page representation.

Download PDF sample

A Practical Introduction to Data Structures and Algorithm by Clifford A. Shaffer
Rated 4.79 of 5 – based on 7 votes