Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Sandra Andersen

Rating No ratings yet

A lab manual that walks computer science students through the implementation of data structures and the application of algorithms. It assumes students have a background in C, C++, or Java. The text introduces the use of classes to implement a simple ADT and also covers more complex Java language features (e.g., abstract window toolkit, cloning, inheritance). The author teaches at Concordia College-Moorehead, MN.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on Java laboratory manual that teaches data structures by having you build each ADT yourself—array and linked implementations, test plans, and all—then apply it to a small real-world problem. Best for CS students who already know C, C++, or Java and want implementation muscle rather than theory alone. 【Book Arc】 - **Opening (~0%–10%)**: Establishes the four-part lab rhythm (Prelab → Bridge → In-lab → Postlab) and the course's working assumptions, so you know how to pace each laboratory before writing any code. - **Early (~10%–32%)**: Builds the fundamentals—interactive command-driven test programs, test plans, the String ADT, wrapper classes, and the List ADT defined through a Java interface, with array-based lists as the first full implementation. - **Middle (~32%–50%)**: Moves into the classic linear structures: Stack and Queue ADTs, each implemented both with arrays and singly linked lists, including the circular-array trick that keeps queue operations efficient. - **Late (~50%–75%)**: Shifts to linked structures and trees—cursor-based linked lists, expression trees for logic circuits, and binary search trees applied to an indexed accounts database. - **Ending (~75%–100%)**: Reaches the more advanced structures, including the array-based Heap ADT; the excerpts do not cover the final laboratories in detail. 【Key Takeaways】 - **The lab format is the pedagogy** (Opening): Each laboratory splits into Prelab, Bridge, In-lab, and Postlab, with rough time budgets (about 45 minutes per In-lab exercise, ~20 minutes per Postlab). This structure is the book's real teaching device—it forces you to prepare, test, and then reflect. - **Test plans come before test runs** (Early): The manual repeatedly warns that command-driven testing makes it easy to violate preconditions and crash a program. Writing out test cases first—empty lists, full lists, cleared lists—is presented as the disciplined alternative to ad-hoc typing. - **Interfaces separate contract from implementation** (Early): The List, Stack, and Queue ADTs are each defined as a Java interface with no data members and all-abstract methods, so the same client code can drive array or linked implementations interchangeably. - **Array vs. linked is a recurring trade-off** (Middle): Stack and Queue are each built both ways, and Postlab exercises ask for worst-case, order-of-magnitude time estimates—pushing you to reason about cost, not just correctness. - **Circular arrays make queues efficient** (Middle): A naive array queue shifts every element on each dequeue; the book instead lets contents drift and wrap using the modulus operator, a concrete lesson in data-structure design. - **ADTs are applied, not just implemented** (Middle): Postfix expression evaluation with a stack, DNA base counting over a list, and curve drawing from point lists show each structure earning its keep in a small application. - **Java language features arrive alongside the structures** (Early): Wrapper classes and primitive conversion, cloning, inheritance, and AWT-based GUI components (Label, TextField, ActionListener) are introduced as the labs need them. - **Trees extend the linked-list toolkit** (Late): Expression trees, binary search trees, and heaps build on the cursor-based linked list, with applications like logic circuits and an indexed accounts database. 【Reading Tips】 - **Skim the Preface and lab-format pages once, then deep-read the Prelab of each laboratory.** The Prelab carries the conceptual load; the In-lab exercises are variations you can select from. - **Do the Postlab complexity questions even if you skip other exercises.** They are short (~20 minutes) and are where the book turns implementation into analysis. - **Treat the Bridge test plans as mandatory.** The manual's own warning about precondition violations is the most transferable lesson in the book. - **If you already know Java well, move quickly through the String ADT and wrapper-class material** and spend your time on the array-vs-linked comparisons and the tree laboratories. - **Keep a running note of which ADT interface each implementation satisfies**—the book reuses the same interfaces across laboratories, and tracking that makes the later structures much easier to place. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book (through the linked-list and early tree laboratories); the final laboratories, including the full Heap ADT treatment and any closing material, are not covered in detail.
Page 8
n and closed laboratory settings. How you use the four-part organization depends on your laboratory environment. Two-Hour Closed Laboratory Prelab Students a...
View in text
Excerpt 2
ty String object. String ( char[ ] charSeq ) Postcondition: Creates a new String object with a character sequence identical to the character array charSeq. S...
View in text
Excerpt 3
wed by a semicolon. • All methods are automatically public. Note that the class must explicitly declare the imple- mented interface method as public, however...
View in text
Excerpt 4
easily implemented through the use of the modulus operator. In this way, position maxSize -1 immediately precedes position 0 where position 0 is equivalent t...
View in text
Excerpt 5
ic and protected methods, as well as any of its own methods. The OrdList class supplies its own constructor, as well as a pair of new methods: a public membe...
View in text
Excerpt 6
tion of an expression tree can be described using recursion. In this exercise, you use recursive methods to implement the operations in the Expression Tree A...
View in text
Excerpt 7
1) / 2; j >= 0; j-- ) moveDown( element, j, size ); 314 LABORATORY 13 are read in as tokens from the keyboard instead of as arguments entered at the command-...
View in text
Excerpt 8
psed time (in milliseconds) public long elapsedTime ( ) } // class Timer Step 2: Save your implementation of the Timer ADT in the file Timer.java. Step 3: Wh...
View in text
Tags
AI categories
Programming LanguageJavaAlgorithm
ISBN: 0763718165
Publish Year: 2001
Language: English
Pages: 423
File Format: PDF
File Size: 2.9 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…