Computer ScienceJava, Java, Java: Object-Oriented Problem Solving
Not rated yetRate this bookJava, Java, Java uses an objects-first approach to introductory programming. Ralph Morelli and Ralph Walde connect problem solving, Java language features and object-oriented design, with games and puzzles recurring through the text.
FreeAbout this book
The third edition is designed for introductory computer science and Java as a second language. Its preface explains why object abstraction appears early: students need to understand how a program is organised, not just recognise its individual statements. UML diagrams, design discussions, exercises and running examples support that goal. The first two parts cover the main introductory sequence, while later chapters can be selected for more advanced work. The hosted open edition is dated June 25, 2017. Its library and interface examples should be studied within that historical software context.
The attached edition contains 856 PDF pages, including front matter. Cover: source edition title page rendered from the PDF. The textbook and its original notices are retained; Academic Master’s study material is separate from the source text.
Book summary
Ralph Morelli and Ralph Walde’s third edition introduces programming through objects, design, and progressively richer game examples. This guide follows the open PDF dated June 25, 2017, including chapters 0–16 and its technical appendices. Core ideas remain valuable, while the edition’s graphical libraries, deployment assumptions, and tool instructions should be studied in their historical context rather than assumed to describe every current Java environment.
Chapter-by-chapter summaries
Chapter 0: Computers, Objects, and Java
The opening chapter relates hardware, networks, programming languages, and object-oriented thinking. Objects combine state with behavior, allowing a program to model interacting responsibilities rather than a single undifferentiated sequence of commands. Distinguish a machine’s execution from the abstractions used to design software. Use a small real-world example to identify candidate objects and the messages they might exchange, while recognizing that a useful software model selectively represents a problem rather than reproducing reality in full.
Chapter 1: Java Program Design and Development
A riddle program introduces the movement from a problem description to a class design and executable code. Language elements, editing, compilation, and execution belong to different stages, and errors can arise at each. The library examples involving System and PrintStream show how a program uses existing objects and services. Trace a complete development cycle and explain each step. Successful compilation establishes only that certain formal requirements are met; testing must still examine whether the program solves the intended problem.
Chapter 2: Objects: Using, Creating, and Defining
Strings, class definitions, input through Scanner, and the two-person game case study develop the object-first approach. An object’s state can change through operations, while its class describes the structure and behavior shared by instances. Keep separate objects distinct when tracing a game. Optional graphics examples offer another way to observe object behavior. Practice explaining why a field belongs to an object and which operations should control it, rather than making every part of a program directly manipulate every value.
Chapter 3: Methods: Communicating with Objects
Parameters, constructors, return values, and control structures explain how objects collaborate. Passing a reference value is not the same as passing an entire object by value, and changes to an object should be distinguished from reassignment of a local variable. The improved OneRowNim example integrates state changes with method design and testing. Early inheritance and polymorphism introduce extensibility. Draw a call trace showing arguments, local work, returned results, and any state changes to make these relationships concrete.
Chapter 4: Input/Output and User Interfaces
Command-line and graphical interfaces provide different ways for people to interact with the same underlying task. The One Row Nim case study helps separate game rules from presentation and input handling. Optional file input broadens where data can originate. Compare what should change when replacing an interface and what should remain part of the model. Test invalid or incomplete input as well as ordinary play. A useful interface communicates constraints without making the core program depend on one particular screen arrangement.
Chapter 5: Java Data and Operators
Boolean, numeric, and character data support different representations and operations. Math and NumberFormat illustrate the difference between computing a value and presenting it. Numeric processing and character-conversion examples reveal how representation affects an algorithm. Predict the type and result of expressions before running them, paying attention to integer division, conversion, and precedence. A mathematically familiar expression may behave differently when evaluated with finite machine types. State the intended representation before choosing operators to manipulate it.
Chapter 6: Control Structures
Counting and conditional loops express repeated work, while switch supports multiway selection. Examples involving loans, averages, data validation, and a checkerboard connect structure to an actual computational goal. Identify initialization, the condition for continuing, the repeated operation, and progress toward termination. Test empty input, a single item, and boundary values. Off-by-one mistakes are easier to diagnose when the intended number of iterations is stated explicitly. Structured design organizes control so that another reader can explain why the process finishes with the correct result.
Chapter 7: Strings and String Processing
Searching, extracting, comparing, and processing characters turns text into data for algorithms. The examples involving keywords, names, and passwords demonstrate why content, position, and length must be tracked carefully. StringBuffer and StringTokenizer appear as library tools in this edition. Distinguish object identity from equality of text, and check indexes before using substrings or character access. A text-processing method should define what happens for empty strings, missing delimiters, or unexpected capitalization. These cases test the actual contract of the method.
Chapter 8: Inheritance and Polymorphism
Inheritance, abstract classes, and interfaces support families of related behaviors. Toggle buttons, ciphers, and game hierarchies show different uses of a common abstraction. The important question is whether a subtype can fulfill the expectations attached to the general type. Polymorphism allows client code to request an operation without deciding every implementation detail itself. Compare a hierarchy with an alternative that uses composition, and explain why the chosen relationship is appropriate. Shared code alone is not a sufficient reason to claim one kind of object is another.
Chapter 9: Arrays and Array Processing
One- and multidimensional arrays organize indexed collections. Letter frequencies, sorting, searching, and an N-player game connect storage with algorithms. Follow the distinction between an index and the value stored at that index. Sorting and searching require clear assumptions, such as whether the data is already ordered. Optional polymorphic sorting and the Vector discussion broaden the design choices available in the edition. Trace a small example manually and identify which portions of the array have been processed at each stage.
Chapter 10: Exceptions
Java’s exception hierarchy and handling mechanisms separate normal computation from exceptional conditions. The chapter develops both responding to existing exceptions and creating or throwing exceptions that express a program’s own contract. A robust design should identify which layer can recover meaningfully rather than catch everything indiscriminately. Write tests that trigger expected failures and inspect the resulting behavior. A message shown through a dialog is only the presentation of a problem; the program must also preserve a coherent state after the failure.
Chapter 11: Files and Streams
Text, binary data, and serialized objects require different forms of input and output. Streams represent the flow of data, while File describes filesystem information and locations in the edition’s API. The chapter’s case studies connect persistent storage with application behavior and graphical file selection. Track opening, processing, and closing resources, and consider missing files or malformed content. Distinguish storing an object representation from designing a stable data format. Use a small round-trip test to check that written data can be read back as intended.
Chapter 12: Recursive Problem Solving
Recursion describes a problem through smaller instances of the same kind. String and array processing and fractal drawing demonstrate the relationship between a base case and a recursive step. Proving progress toward the base case is as important as recognizing repeated structure. Trace a small call tree and account for how results combine on the way back. Compare recursion with iteration in terms of clarity and resource use. Tail recursion is discussed as a design concept; do not assume every runtime automatically optimizes it away.
Chapter 13: Graphical User Interfaces
Swing components, event handling, layout managers, and model–view–controller ideas support richer interfaces. A user event triggers behavior rather than following the fixed sequence of a command-line dialogue. Separate the model’s state from the code that displays it and the code that responds to actions. Test event sequences as well as isolated clicks, because prior interactions can change the meaning of the next one. The edition’s GUI examples are a setting for learning these responsibilities, even when a later application uses a different toolkit.
Chapter 14: Threads and Concurrent Programming
Threads introduce multiple flows of execution and the need to reason about their coordination. A program can no longer assume that operations from different threads occur in the order suggested by a single reading of the source. Identify shared state and the conditions under which access must be coordinated. Trace alternative interleavings on a small example and distinguish a scheduling difference from a correctness failure. Concurrent design should explain both how useful work proceeds and how threads complete or stop without leaving the application inconsistent.
Chapter 15: Sockets and Networking
Socket-based communication extends programs beyond a single machine or process. Client and server responsibilities, transmitted data, and the rules of an application protocol must be distinguished. Follow a complete exchange and explain how each participant knows when a message is finished. Network examples also require attention to delays, disconnection, and resource cleanup. Begin locally with a controlled pair of programs and predictable messages. A working demonstration becomes an understandable system when the protocol and assumptions are explicit.
Chapter 16: Lists, Stacks, and Queues
Data structures organize both storage and the operations permitted on it. Lists support ordered collections, stacks impose last-in-first-out access, and queues impose first-in-first-out access. The choice should follow the problem’s required behavior rather than familiarity with a particular implementation. Trace insertions and removals with a small sequence and inspect empty-structure cases. Compare an abstract operation with the underlying representation used to implement it. This distinction connects the book’s final material to its opening emphasis on objects and responsibilities.
Appendices: Conventions, tools, and language references
The appendices cover coding conventions, the development kit, character sets, keywords, precedence, inner classes, autoboxing, enumeration, and UML resources. Use them to clarify a specific example rather than memorize isolated tables. Maintain a consistent coding style so that structure is visible to another reader. Since these references accompany the 2017 PDF, distinguish the language and tooling described there from your installed environment. Record any necessary adaptation and confirm that it preserves the chapter’s intended programming lesson.
Study instructions
- For each chapter, predict a short program’s behavior, trace it manually, run it, and explain any discrepancy.
- Keep game rules independent of input and display code as the running examples develop.
- Test normal, empty, boundary, and invalid cases; choose cases that challenge the algorithm’s assumptions.
- Record the compiler and runtime used and document adaptations to historical GUI or tooling examples.
- Finish with a small application combining object design, a collection, persistent data, and a clear error-handling policy.
Questions for reflection
- Which class owns each piece of state, and which methods are allowed to change it?
- What assumptions must hold for an algorithm or data structure to work correctly?
- How does an event-driven or concurrent program change the way you reason about execution order?
Sources and coverage
This original study guide follows the complete linked source edition and all of its substantive chapters or named teaching sections. It condenses their main ideas and relationships; the study tasks are guidance for reading alongside the complete resource. It does not reproduce the source exercises or answer key. Book source; Complete source PDF.
Check this edition’s source and licence before reusing its files or content. A library listing does not grant additional rights.
Read our Library Access & Copyright policyObject abstraction
Explain the preface’s objects-first rationale.
Program organisation
Relate decomposition to interacting objects.
Course structure
Distinguish the introductory route from advanced options.
Historical edition
Record the software context of examples.
Reader ratings & reviews
Share your thoughts
Your review helps other students choose the right resources.









